io.github.honoriuss.blossom.BlossomOptionalParameterProviderImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tracking-blossom Show documentation
Show all versions of tracking-blossom Show documentation
Track your app nice and convenient
package io.github.honoriuss.blossom;
import io.github.honoriuss.blossom.interfaces.ITrackingParameterProvider;
import jakarta.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
class BlossomOptionalParameterProviderImpl implements ITrackingParameterProvider {
private final Map headers;
private final HttpServletRequest request;
public BlossomOptionalParameterProviderImpl(Map headers, HttpServletRequest request) {
this.headers = headers;
this.request = request;
}
@Override
public HashMap getBaseParameters() {
var map = new HashMap();
for (var headerKey : headers.keySet()) {
map.put(headers.get(headerKey), request.getHeader(headerKey));
}
return map;
}
}