HTTP class

custom HTTP class

Constructors

HTTP({required Client client, int restRetryLimit = 5})
HTTP constructor

Properties

client Client
The main client object
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
restRetryLimit int
5xx Server Errors retry limit
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

get({required String url, required Map<String, dynamic> headers}) Future<HttpResponse>
get request
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post({required String url, required Map<String, dynamic> headers, dynamic body}) Future<HttpResponse>
post request
send({required String method, required String url, required Map<String, dynamic> headers, dynamic body, ResponseType responseType = ResponseType.json, int retries = 0}) Future<HttpResponse>
Send request
toString() String
A string representation of this object.
inherited

Operators

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