Class HTTPResponse
java.lang.Object
com.inductiveautomation.snap.websites.HTTPResponse
A class to represent an HTTP response.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds a header for key.byte[]getBytes()Returns the bytes.intgetCode()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.longReturns the response time in milliseconds.Returns a response summary string.getText()Returns the response byte string.toString()Returns a string representation.
- 
Field Details- 
OKpublic static final int OK- See Also:
 
- 
BAD_REQUESTpublic static final int BAD_REQUEST- See Also:
 
- 
UNAUTHORIZEDpublic static final int UNAUTHORIZED- See Also:
 
- 
FORBIDDENpublic static final int FORBIDDEN- See Also:
 
- 
NOT_FOUNDpublic static final int NOT_FOUND- See Also:
 
 
- 
- 
Constructor Details- 
HTTPResponsepublic HTTPResponse()
 
- 
- 
Method Details- 
getCodepublic int getCode()Returns the response return code.
- 
getMessageReturns the response return message.
- 
getHeadersReturns the headers.
- 
addHeaderAdds a header for key.
- 
getHeaderStringReturns the headers as a string.
- 
getCookiesReturns the cookies.
- 
getCookieStringReturns the cookie string.
- 
getContentTypeReturns the content type.
- 
getBytespublic byte[] getBytes()Returns the bytes.
- 
getTextReturns the response byte string.
- 
getResponseTimepublic long getResponseTime()Returns the response time in milliseconds.
- 
getSummaryReturns a response summary string.
- 
toStringReturns a string representation.
 
-