Class HttpHeader


  • public final class HttpHeader
    extends Object
    HTTP header and it's value.
    • Constructor Detail

      • HttpHeader

        public HttpHeader()
    • Method Detail

      • name

        public String name()
        Get the name property: Header name.
        Returns:
        the name value.
      • withName

        public HttpHeader withName​(String name)
        Set the name property: Header name.
        Parameters:
        name - the name value to set.
        Returns:
        the HttpHeader object itself.
      • value

        public String value()
        Get the value property: Header value.
        Returns:
        the value value.
      • withValue

        public HttpHeader withValue​(String value)
        Set the value property: Header value.
        Parameters:
        value - the value value to set.
        Returns:
        the HttpHeader object itself.
      • validate

        public void validate()
        Validates the instance.
        Throws:
        IllegalArgumentException - thrown if the instance is not valid.