Class Header

All Implemented Interfaces:
Serializable

@Deprecated public class Header extends NameValuePair
Deprecated.
Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project. It is not recommended to use it in any new code. Instead, use HTTP client API plugins as a dependency in your code. E.g. Apache HttpComponents Client API 4.x Plugin or Async HTTP Client Plugin.

An HTTP header.

See Also:
  • Constructor Details

    • Header

      public Header()
      Deprecated.
      Default constructor.
    • Header

      public Header(String name, String value)
      Deprecated.
      Constructor with name and value
      Parameters:
      name - the header name
      value - the header value
    • Header

      public Header(String name, String value, boolean isAutogenerated)
      Deprecated.
      Constructor with name and value
      Parameters:
      name - the header name
      value - the header value
      isAutogenerated - true if the header is autogenerated, false otherwise.
      Since:
      3.0
  • Method Details

    • toExternalForm

      public String toExternalForm()
      Deprecated.
      Returns a String representation of the header.
      Returns:
      stringHEAD
    • toString

      public String toString()
      Deprecated.
      Returns a String representation of the header.
      Overrides:
      toString in class NameValuePair
      Returns:
      stringHEAD
    • getValues

      public HeaderElement[] getValues() throws HttpException
      Deprecated.
      Use #getElements
      Returns an array of HeaderElements constructed from my value.
      Returns:
      an array of header elements
      Throws:
      HttpException - if the header cannot be parsed
      See Also:
    • getElements

      public HeaderElement[] getElements()
      Deprecated.
      Returns an array of HeaderElements constructed from my value.
      Returns:
      an array of header elements
      Since:
      3.0
      See Also:
    • isAutogenerated

      public boolean isAutogenerated()
      Deprecated.
      Returns the value of the auto-generated header flag.
      Returns:
      true if the header is autogenerated, false otherwise.
      Since:
      3.0