ParodiaHTTP class

This class provides a common structure for making HTTP requests, including setting headers and handling different types of requests. It uses the Dio package to make the requests. Provides methods to make GET, POST, PUT, and DELETE requests to a specified path. It returns a ResponseModel object, which can be used to check the status code and message of the response, and to access the data.

Constructors

ParodiaHTTP({required String baseUrl, required String storeKey, String? authToken, String? currency})
Creates a new instance of ParodiaHTTP.

Properties

authToken String?
no setter
getCurrency String?
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setAuthToken String?
no getter
setBaseUrl String
no getter
setCurrency String?
no getter
setDio ← Dio
no getter
setStoreKey String
no getter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
request({required RequestType requestType, required String path, String? param, QueryModel? query, BodyDataModel? data, ContentType? contentType}) Future<ResponseModel>
Makes a request.
toString() String
A string representation of this object.
inherited

Operators

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