APIRequest constructor
APIRequest(})
Creates new request
- APIRequest.settings defaults to APIFlags.waiting
- APIRequest.useAuth defaults to
false
- APIRequest.httpMethod defaults to APIHttpMethod.GET
Implementation
APIRequest(
this.method, {
this.methodId,
this.settings = APIFlags.waiting,
this.useAuth = false,
/// JSON body to send
Map<String, String> data = const {},
/// Headers to send
///
/// ```
/// Key: Value
/// ```
Map<String, String> headers = const {},
this.httpMethod = APIHttpMethod.GET,
}) : _completer = Completer(),
data = Map.from(data),
headers = Map.from(headers),
_originalData = data,
_originalHeaders = headers;