APIBase class
APIBase class contains attributes, properties and methods for base implementation of the http requests like GET
, POST
.
Constructors
- APIBase()
Properties
Methods
-
get(
String apiKey, BuildContext context, {String? apiUrl, dynamic bodyData, Options? options}) → Future< BaseResponseModel> -
get method will be used to call
GET
method in all the methods which is making use ofGET
methods.apiUrl
will be used to specify the particular url that will be used for the API call.options
will be theGET
requestOptions
given by theDio
package. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
String apiKey, BuildContext context, {String? apiUrl, dynamic bodyData, Options? options}) → Future< BaseResponseModel> -
post method will be used to call
POST
method in all the methods which is making use ofPOST
methods.apiUrl
will be used to specify the particular url that will be used for the API call.bodyData
will be used to set the body data for thePOST
method if any.options
will be thePOST
requestOptions
given by theDio
package. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited