PackageHttp class

This will be used for HTTP Api requests

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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

Static Methods

deleteRequest({required Uri url, Map<String, String>? headers}) → dynamic
Http get request
getRequest({required Uri url, Map<String, String>? headers}) → dynamic
Http get request
getUriFromEndpoints({required String endpoint, Map<String, dynamic>? queryParams, bool usePrefix = false, List<String>? pathSeg}) Uri
it will create uri from given endpoint with including baseurl baseurl can be setup by calling setup function
postRequest({required Uri url, Map<String, String>? headers, required dynamic body}) → dynamic
Http post request
putRequest({required Uri url, Map<String, String>? headers, required Map<String, dynamic> body}) → dynamic
Http put request
setup({String? host, String? prefix}) → dynamic
define host and prefix so that on every request only specify endpoint
setupClient({required Client client}) → void
setup http client