Package org.apache.commons.httpclient
Class StatusLine
- java.lang.Object
-
- org.apache.commons.httpclient.StatusLine
-
@Deprecated public class StatusLine extends java.lang.Object
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:
HttpStatus
-
-
Constructor Summary
Constructors Constructor Description StatusLine(java.lang.String statusLine)
Deprecated.Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getHttpVersion()
Deprecated.java.lang.String
getReasonPhrase()
Deprecated.int
getStatusCode()
Deprecated.static boolean
startsWithHTTP(java.lang.String s)
Deprecated.Tests if the string starts with 'HTTP' signature.java.lang.String
toString()
Deprecated.Return a string representation of this object.
-
-
-
Constructor Detail
-
StatusLine
public StatusLine(java.lang.String statusLine) throws HttpException
Deprecated.Default constructor.- Parameters:
statusLine
- the status line returned from the HTTP server- Throws:
HttpException
- if the status line is invalid
-
-
Method Detail
-
getStatusCode
public final int getStatusCode()
Deprecated.- Returns:
- the Status-Code
-
getHttpVersion
public final java.lang.String getHttpVersion()
Deprecated.- Returns:
- the HTTP-Version
-
getReasonPhrase
public final java.lang.String getReasonPhrase()
Deprecated.- Returns:
- the Reason-Phrase
-
toString
public final java.lang.String toString()
Deprecated.Return a string representation of this object.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string represenation of this object.
-
startsWithHTTP
public static boolean startsWithHTTP(java.lang.String s)
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.
-
-