Class HTTPResponse
java.lang.Object
com.inductiveautomation.snap.websites.HTTPResponse
A class to represent an HTTP response.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a header for key.byte[]
getBytes()
Returns the bytes.int
getCode()
Returns the response return code.Returns the content type.Returns the cookies.Returns the cookie string.Returns the headers.Returns the headers as a string.Returns the response return message.long
Returns the response time in milliseconds.Returns a response summary string.getText()
Returns the response byte string.toString()
Returns a string representation.
-
Field Details
-
OK
public static final int OK- See Also:
-
BAD_REQUEST
public static final int BAD_REQUEST- See Also:
-
UNAUTHORIZED
public static final int UNAUTHORIZED- See Also:
-
FORBIDDEN
public static final int FORBIDDEN- See Also:
-
NOT_FOUND
public static final int NOT_FOUND- See Also:
-
-
Constructor Details
-
HTTPResponse
public HTTPResponse()
-
-
Method Details
-
getCode
public int getCode()Returns the response return code. -
getMessage
Returns the response return message. -
getHeaders
Returns the headers. -
addHeader
Adds a header for key. -
getHeaderString
Returns the headers as a string. -
getCookies
Returns the cookies. -
getCookieString
Returns the cookie string. -
getContentType
Returns the content type. -
getBytes
public byte[] getBytes()Returns the bytes. -
getText
Returns the response byte string. -
getResponseTime
public long getResponseTime()Returns the response time in milliseconds. -
getSummary
Returns a response summary string. -
toString
Returns a string representation.
-