HttpResponse
classin packageklyn.net
public class HttpResponse extends Object:
HTTP response value object inspired by Python `requests.Response`.
Fields
| Modifier and Type |
Member |
Description |
| public readonly |
body |
Response body as text. |
| public readonly |
headers |
Response headers. |
| public readonly |
httpMethod |
HTTP method used by the request. |
| public readonly |
statusCode |
HTTP status code (for example 200, 404, 500). |
| public readonly |
url |
Effective URL used by the request (after redirects when enabled). |
Properties
| Modifier and Type |
Member |
Description |
| public readonly property |
ok |
Returns true when the status code is in `[200, 299]`. |
| public readonly property |
text |
Python-requests style alias. |
Methods
| Modifier and Type |
Member |
Description |
| public |
json json<TYPE>() as TYPE:
|
Parses `body` as JSON and returns the typed value. |
| public override |
toString |
No summary. |