Class FHIRRequestHeader


  • public class FHIRRequestHeader
    extends java.lang.Object
    This class represents an HTTP request header that will be used as part of a FHIRClient operation invocation.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Returns the name of the request header.
      java.lang.Object getValue()
      Returns the value of the request header.
      static FHIRRequestHeader header​(java.lang.String name, java.lang.Object value)
      This static method can be used as a shortcut for instantiating a new FHIRRequestHeader.
      void setName​(java.lang.String name)
      Sets the name of the request header.
      void setValue​(java.lang.Object value)
      Sets the value of the request header.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FHIRRequestHeader

        public FHIRRequestHeader()
      • FHIRRequestHeader

        public FHIRRequestHeader​(java.lang.String name,
                                 java.lang.Object value)
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the request header.
      • setName

        public void setName​(java.lang.String name)
        Sets the name of the request header.
      • getValue

        public java.lang.Object getValue()
        Returns the value of the request header.
      • setValue

        public void setValue​(java.lang.Object value)
        Sets the value of the request header.
      • header

        public static FHIRRequestHeader header​(java.lang.String name,
                                               java.lang.Object value)
        This static method can be used as a shortcut for instantiating a new FHIRRequestHeader. Example:
              import static org.linuxforhealth.fhir.client.FHIRRequestHeader.header;
              
              ...
              
              response = client.create(myPatient, header("Header1","value1"), header("Header2","value2"));
         
        Parameters:
        name - the name of the request header
        value - the value of the request header
        Returns:
        a new FHIRRequestHeader instance