Class Response
java.lang.Object
com.inductiveautomation.ignition.common.script.builtin.http.Response
A thin wrapper around the 
HttpResponse class. Will only ever directly contain a HttpResponse<byte[]>
 - is not truly generic.- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbyte[]getBody()HttpResponse<byte[]>org.python.core.PyObjectgetJson()org.python.core.PyObjectAttempt to decode the rawbyte[]this Response contains to a string with the specified charset, and then decode that string to a direct Python representation (ie, dictionaries and lists).intgetText()Attempt to decode the rawbyte[]this Response contains to a string with the specified charset.getUrl()booleanbooleanisGood()booleantoString()
- 
Constructor Details- 
Response
 
- 
- 
Method Details- 
getBodypublic byte[] getBody()
- 
getJsonpublic org.python.core.PyObject getJson()
- 
getJsonAttempt to decode the rawbyte[]this Response contains to a string with the specified charset, and then decode that string to a direct Python representation (ie, dictionaries and lists). Encoding defaults to the charset specified in the response, orStandardCharsets.UTF_8if the response did not specify a charset.
- 
getText
- 
getTextAttempt to decode the rawbyte[]this Response contains to a string with the specified charset. Caches decoded bodies so they can be quickly retrieved again, per charset. Encoding defaults to the charset specified in the response, orStandardCharsets.UTF_8if the response did not specify a charset.
- 
getUrl
- 
getHeaders
- 
getStatusCodepublic int getStatusCode()
- 
isGoodpublic boolean isGood()- Returns:
- true if the response code was not any error.
 
- 
isClientErrorpublic boolean isClientError()- Returns:
- true if the response code was a 4XX error.
 
- 
isServerErrorpublic boolean isServerError()- Returns:
- true if the response code was a 5XX error.
 
- 
getCookieManager
- 
getJavaResponse
- 
getRequest
- 
toString
 
-