Package org.apache.commons.httpclient
Class Header
- java.lang.Object
-
- org.apache.commons.httpclient.NameValuePair
-
- org.apache.commons.httpclient.Header
-
- All Implemented Interfaces:
java.io.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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Header()
Deprecated.Default constructor.Header(java.lang.String name, java.lang.String value)
Deprecated.Constructor with name and valueHeader(java.lang.String name, java.lang.String value, boolean isAutogenerated)
Deprecated.Constructor with name and value
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description HeaderElement[]
getElements()
Deprecated.Returns an array ofHeaderElement
s constructed from my value.HeaderElement[]
getValues()
Deprecated.Use #getElementsboolean
isAutogenerated()
Deprecated.Returns the value of the auto-generated header flag.java.lang.String
toExternalForm()
Deprecated.Returns aString
representation of the header.java.lang.String
toString()
Deprecated.Returns aString
representation of the header.
-
-
-
Constructor Detail
-
Header
public Header()
Deprecated.Default constructor.
-
Header
public Header(java.lang.String name, java.lang.String value)
Deprecated.Constructor with name and value- Parameters:
name
- the header namevalue
- the header value
-
Header
public Header(java.lang.String name, java.lang.String value, boolean isAutogenerated)
Deprecated.Constructor with name and value- Parameters:
name
- the header namevalue
- the header valueisAutogenerated
- true if the header is autogenerated, false otherwise.- Since:
- 3.0
-
-
Method Detail
-
toExternalForm
public java.lang.String toExternalForm()
Deprecated.Returns aString
representation of the header.- Returns:
- stringHEAD
-
toString
public java.lang.String toString()
Deprecated.Returns aString
representation of the header.- Overrides:
toString
in classNameValuePair
- Returns:
- stringHEAD
-
getValues
public HeaderElement[] getValues() throws HttpException
Deprecated.Use #getElementsReturns an array ofHeaderElement
s constructed from my value.- Returns:
- an array of header elements
- Throws:
HttpException
- if the header cannot be parsed- See Also:
HeaderElement.parse(java.lang.String)
-
getElements
public HeaderElement[] getElements()
Deprecated.Returns an array ofHeaderElement
s constructed from my value.- Returns:
- an array of header elements
- Since:
- 3.0
- See Also:
HeaderElement.parseElements(String)
-
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
-
-