HttpResponse class abstract

A response to a HttpRequest from the Discord API.

This class is a wrapper around BaseResponse from package:http providing support for errors and for parsing the received body.

Implementers

Constructors

HttpResponse({required BaseResponse response, required HttpRequest request, required Uint8List body})
Create a new HttpResponse.

Properties

body Uint8List
The body of the response as it was received from the API.
final
hashCode int
The hash code for this object.
no setterinherited
hasJsonBody bool
Whether jsonBody contains the JSON decoded body of the response.
latefinal
headers Map<String, String>
The headers from the response.
final
jsonBody ↔ dynamic
The JSON decoded body of the response.
latefinal
request HttpRequest
The HttpRequest this response is for.
final
response BaseResponse
The BaseResponse from package:http this HttpResponse is wrapping.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
The status code of the response.
final
textBody String?
The UTF-8 decoded body of the response.
latefinal

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited