use of com.okta.commons.http.HttpHeaders in project okta-sdk-java by okta.
the class DefaultDataStore method headers.
private HttpHeaders headers(Map<String, List<String>> headerParameters) {
if (!Collections.isEmpty(headerParameters)) {
HttpHeaders headers = new HttpHeaders();
headers.putAll(headerParameters);
return headers;
}
return null;
}
use of com.okta.commons.http.HttpHeaders in project okta-idx-java by okta.
the class BaseIDXClient method getHttpHeaders.
private HttpHeaders getHttpHeaders(boolean isOAuth2Endpoint) {
HttpHeaders httpHeaders = new HttpHeaders();
if (isOAuth2Endpoint) {
httpHeaders.add("Content-Type", "application/x-www-form-urlencoded");
httpHeaders.add("Accept", "application/json");
} else {
httpHeaders.add("Content-Type", "application/ion+json; okta-version=1.0.0");
httpHeaders.add("Accept", "application/ion+json; okta-version=1.0.0");
}
httpHeaders.add(HttpHeaders.USER_AGENT, USER_AGENT_HEADER_VALUE);
return httpHeaders;
}
Aggregations