
Class ClientHeaders
java.lang.Object
org.hl7.fhir.dstu3.utils.client.network.ClientHeaders
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 -
Method Summary
Modifier and TypeMethodDescriptionaddHeader
(org.hl7.fhir.utilities.http.HTTPHeader header) Add a header to the list of stored headers for network operations.addHeaders
(List<org.hl7.fhir.utilities.http.HTTPHeader> headerList) Add a header to the list of stored headers for network operations.Clears all storedHTTPHeader
.ArrayList
<org.hl7.fhir.utilities.http.HTTPHeader> headers()
removeHeader
(org.hl7.fhir.utilities.http.HTTPHeader header) Removes the passed in header from the list of stored headers.removeHeaders
(List<org.hl7.fhir.utilities.http.HTTPHeader> headerList) Removes the passed in headers from the list of stored headers.toString()
-
Constructor Details
-
ClientHeaders
public ClientHeaders() -
ClientHeaders
-
-
Method Details
-
headers
-
addHeader
public ClientHeaders addHeader(org.hl7.fhir.utilities.http.HTTPHeader header) throws org.hl7.fhir.exceptions.FHIRException Add a header to the list of stored headers for network operations.- Parameters:
header
-HTTPHeader
to add to the list.- Throws:
org.hl7.fhir.exceptions.FHIRException
- if the header being added is a duplicate.
-
addHeaders
public ClientHeaders addHeaders(List<org.hl7.fhir.utilities.http.HTTPHeader> headerList) throws org.hl7.fhir.exceptions.FHIRException Add a header to the list of stored headers for network operations.- Parameters:
headerList
-List
ofHTTPHeader
to add.- Throws:
org.hl7.fhir.exceptions.FHIRException
- if any of the headers being added is a duplicate.
-
removeHeader
public ClientHeaders removeHeader(org.hl7.fhir.utilities.http.HTTPHeader header) throws org.hl7.fhir.exceptions.FHIRException Removes the passed in header from the list of stored headers.- Parameters:
header
-HTTPHeader
to 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<org.hl7.fhir.utilities.http.HTTPHeader> headerList) throws org.hl7.fhir.exceptions.FHIRException Removes the passed in headers from the list of stored headers.- Parameters:
headerList
-List
ofHTTPHeader
to remove.- Throws:
org.hl7.fhir.exceptions.FHIRException
- if any of the headers passed in does not exist within the stored list.
-
clearHeaders
Clears all storedHTTPHeader
. -
toString
-