Class ClientHeaders
- java.lang.Object
-
- org.hl7.fhir.r4b.utils.client.network.ClientHeaders
-
public class ClientHeaders extends Object
Generic Implementation of Client Headers. Stores a list of headers for HTTP calls to the TX server. Users can implement their own instance if they desire specific, custom behavior.
-
-
Constructor Summary
Constructors Constructor Description ClientHeaders()ClientHeaders(ArrayList<okhttp3.internal.http2.Header> headers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientHeadersaddHeader(okhttp3.internal.http2.Header header)Add a header to the list of stored headers for network operations.ClientHeadersaddHeaders(List<okhttp3.internal.http2.Header> headerList)Add a header to the list of stored headers for network operations.ClientHeadersclearHeaders()Clears all storedHeader.ArrayList<okhttp3.internal.http2.Header>headers()ClientHeadersremoveHeader(okhttp3.internal.http2.Header header)Removes the passed in header from the list of stored headers.ClientHeadersremoveHeaders(List<okhttp3.internal.http2.Header> headerList)Removes the passed in headers from the list of stored headers.StringtoString()
-
-
-
Constructor Detail
-
ClientHeaders
public ClientHeaders()
-
ClientHeaders
public ClientHeaders(ArrayList<okhttp3.internal.http2.Header> headers)
-
-
Method Detail
-
addHeader
public ClientHeaders addHeader(okhttp3.internal.http2.Header header) throws org.hl7.fhir.exceptions.FHIRException
Add a header to the list of stored headers for network operations.- Parameters:
header-Headerto add to the list.- Throws:
org.hl7.fhir.exceptions.FHIRException- if the header being added is a duplicate.
-
addHeaders
public ClientHeaders addHeaders(List<okhttp3.internal.http2.Header> headerList) throws org.hl7.fhir.exceptions.FHIRException
Add a header to the list of stored headers for network operations.- Parameters:
headerList-ListofHeaderto add.- Throws:
org.hl7.fhir.exceptions.FHIRException- if any of the headers being added is a duplicate.
-
removeHeader
public ClientHeaders removeHeader(okhttp3.internal.http2.Header header) throws org.hl7.fhir.exceptions.FHIRException
Removes the passed in header from the list of stored headers.- Parameters:
header-Headerto remove from the list.- Throws:
org.hl7.fhir.exceptions.FHIRException- if the header passed in does not exist within the stored list.
-
removeHeaders
public ClientHeaders removeHeaders(List<okhttp3.internal.http2.Header> headerList) throws org.hl7.fhir.exceptions.FHIRException
Removes the passed in headers from the list of stored headers.- Parameters:
headerList-ListofHeaderto remove.- Throws:
org.hl7.fhir.exceptions.FHIRException- if any of the headers passed in does not exist within the stored list.
-
clearHeaders
public ClientHeaders clearHeaders()
Clears all storedHeader.
-
-