Package org.apache.commons.httpclient
Class StatusLine
java.lang.Object
org.apache.commons.httpclient.StatusLine
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.
Represents a Status-Line as returned from a HTTP server.
RFC2616 states
the following regarding the Status-Line:
6.1 Status-Line
The first line of a Response message is the Status-Line, consisting
of the protocol version followed by a numeric status code and its
associated textual phrase, with each element separated by SP
characters. No CR or LF is allowed except in the final CRLF sequence.
Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
This class is immutable and is inherently thread safe.
- Since:
- 2.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
StatusLine
Deprecated.Default constructor.- Parameters:
statusLine- the status line returned from the HTTP server- Throws:
HttpException- if the status line is invalid
-
-
Method Details
-
getStatusCode
public final int getStatusCode()Deprecated.- Returns:
- the Status-Code
-
getHttpVersion
Deprecated.- Returns:
- the HTTP-Version
-
getReasonPhrase
Deprecated.- Returns:
- the Reason-Phrase
-
toString
Deprecated.Return a string representation of this object. -
startsWithHTTP
Deprecated.Tests if the string starts with 'HTTP' signature.- Parameters:
s- string to test- Returns:
- true if the line starts with 'HTTP' signature, false otherwise.
-