request method
Future<Map<String, dynamic> >
request(
- String url,
- Map<
String, dynamic> params, { - required NetworkMethodType method,
- bool absoluteUrl = false,
- bool isRawResponse = false,
- bool isSimpleResponse = false,
- bool isNeedAutoSetupDeviceInfo = true,
- bool isUseMemoryCache = false,
- String? cacheKey,
- Map<
String, String> ? customHeaders, - List<
String> ? ignoreErrorCodes,
Http request.
url.paramsThe MapObj of HTTP Body.methodNetworkMethodType.isRawResponseReturning the response raw data directly.isSimpleResponseThe 'data' could be null or SimpleType at the response value.isNeedAutoSetupDeviceInfoAutomatic invoking the_setupDeviceInfoIfNeeded.ignoreErrorCodesThe response codes that will not be recognize.
Implementation
Future<Map<String, dynamic>> request(
String url, Map<String, dynamic> params, {
required NetworkMethodType method,
bool absoluteUrl = false,
bool isRawResponse = false,
bool isSimpleResponse = false,
bool isNeedAutoSetupDeviceInfo = true,
bool isUseMemoryCache = false,
String? cacheKey,
Map<String, String>? customHeaders,
List<String>? ignoreErrorCodes,
}) async {
return _request.request(
url,
params,
method: method,
absoluteUrl: absoluteUrl,
isRawResponse: isRawResponse,
isSimpleResponse: isSimpleResponse,
isNeedAutoSetupDeviceInfo: isNeedAutoSetupDeviceInfo,
isUseMemoryCache: isUseMemoryCache,
customHeaders: customHeaders,
cacheKey: cacheKey,
ignoreErrorCodes: ignoreErrorCodes,
);
}