Class StatusLine
- java.lang.Object
-
- com.squareup.okhttp.internal.http.StatusLine
-
public final class StatusLine extends Object
An HTTP response status line like "HTTP/1.1 200 OK".
-
-
Field Summary
Fields Modifier and Type Field Description intcodestatic intHTTP_CONTINUEstatic intHTTP_PERM_REDIRECTstatic intHTTP_TEMP_REDIRECTNumeric status code, 307: Temporary Redirect.StringmessageProtocolprotocol
-
Constructor Summary
Constructors Constructor Description StatusLine(Protocol protocol, int code, String message)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StatusLineget(Response response)static StatusLineparse(String statusLine)StringtoString()Returns a string containing a concise, human-readable description of this object.
-
-
-
Field Detail
-
HTTP_TEMP_REDIRECT
public static final int HTTP_TEMP_REDIRECT
Numeric status code, 307: Temporary Redirect.- See Also:
- Constant Field Values
-
HTTP_PERM_REDIRECT
public static final int HTTP_PERM_REDIRECT
- See Also:
- Constant Field Values
-
HTTP_CONTINUE
public static final int HTTP_CONTINUE
- See Also:
- Constant Field Values
-
protocol
public final Protocol protocol
-
code
public final int code
-
message
public final String message
-
-
Method Detail
-
get
public static StatusLine get(Response response)
-
parse
public static StatusLine parse(String statusLine) throws IOException
- Throws:
IOException
-
toString
public String toString()
Description copied from class:ObjectReturns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toStringmethod if you intend implementing your owntoStringmethod.
-
-