Class HTTPRequest
java.lang.Object
com.inductiveautomation.snap.websites.HTTPRequest
A class to represent an HTTP request and generate a response.
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructorsConstructorDescriptionHTTPRequest(String aString) Creates a new URL from string.HTTPRequest(URL aURL) Creates a new URL from Java URL.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds a header for key.byte[]getBytes()Returns the bytes associated with request (POST).Returns the cookie.Returns the headers.Executes this request and returns a response.getURL()Returns the URL.Returns the URL string.voidsetBytes(byte[] theBytes) Sets the bytes associated with the request (POST).voidSets the cookie.toString()Standard toString implementation.
- 
Constructor Details- 
HTTPRequestCreates a new URL from Java URL.
- 
HTTPRequestCreates a new URL from string.
 
- 
- 
Method Details- 
getURLReturns the URL.
- 
getURLStringReturns the URL string.
- 
getCookieReturns the cookie.
- 
setCookieSets the cookie.
- 
getHeadersReturns the headers.
- 
addHeaderAdds a header for key.
- 
getBytespublic byte[] getBytes()Returns the bytes associated with request (POST).
- 
setBytespublic void setBytes(byte[] theBytes) Sets the bytes associated with the request (POST).
- 
getResponseExecutes this request and returns a response.- Throws:
- IOException
 
- 
toStringStandard toString implementation.
 
-