HttpResponse
classin packageklyn.net
public class HttpResponse extends Object
└ HttpResponse

HTTP response value object inspired by Python requests.Response.

Fields
Modifier and Type Member Description
public readonly body
body as String
Response body as text.
public readonly headers
headers as SortedMap<String, String>
Response headers.
public readonly httpMethod
httpMethod as String
HTTP method used by the request.
public readonly statusCode
statusCode as Int
HTTP status code (for example 200, 404, 500).
public readonly url
url as String
Effective URL used by the request (after redirects when enabled).
Properties
Modifier and Type Member Description
public readonly property ok
ok as Boolean
Returns true when the status code is in [200, 299].
public readonly property text
text as String
Python-requests style alias.
Inherited Properties
propertyInherited Properties from Object: type
Methods
Modifier and Type Member Description
public json
json<TYPE>() as TYPE
Parses body as JSON and returns the typed value.
public override toString
toString() as String
No summary.
Inherited Methods
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml