public class AdditionalRequestHeadersInterceptor extends Object implements ca.uhn.fhir.rest.client.api.IClientInterceptor
IClientExecutable.withAdditionalHeader(String, String)| Constructor and Description |
|---|
AdditionalRequestHeadersInterceptor() |
AdditionalRequestHeadersInterceptor(Map<String,List<String>> additionalHttpHeaders) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAllHeaderValues(String headerName,
List<String> headerValues)
Adds the list of header values for the given header.
|
void |
addHeaderValue(String headerName,
String headerValue)
Adds the given header value.
|
void |
interceptRequest(ca.uhn.fhir.rest.client.api.IHttpRequest theRequest)
Adds the additional header values to the HTTP request.
|
void |
interceptResponse(ca.uhn.fhir.rest.client.api.IHttpResponse theResponse)
Does nothing since this interceptor is not concerned with the response.
|
public AdditionalRequestHeadersInterceptor()
public AdditionalRequestHeadersInterceptor(Map<String,List<String>> additionalHttpHeaders)
public void addHeaderValue(String headerName, String headerValue)
headerName and headerValue cannot be null.headerName - the name of the headerheaderValue - the value to add for the headerNullPointerException - if either parameter is nullpublic void addAllHeaderValues(String headerName, List<String> headerValues)
headerName and headerValues cannot be null.headerName - the name of the headerheaderValues - the list of values to add for the headerNullPointerException - if either parameter is nullpublic void interceptRequest(ca.uhn.fhir.rest.client.api.IHttpRequest theRequest)
interceptRequest in interface ca.uhn.fhir.rest.client.api.IClientInterceptortheRequest - the HTTP requestpublic void interceptResponse(ca.uhn.fhir.rest.client.api.IHttpResponse theResponse) throws IOException
interceptResponse in interface ca.uhn.fhir.rest.client.api.IClientInterceptortheResponse - the HTTP responseIOExceptionCopyright © 2014–2019 University Health Network. All rights reserved.