send method
Implementation
Future<MFResponse> send(
{Map json, Map formParameters, String requestBody}) async {
Map response;
if (json != null) {
response = await _channel.invokeMethod(WLRESOURCEREQUEST_SEND_JSON,
<String, dynamic>{UUID: _uuid, JSON: json});
} else if (formParameters != null) {
response = await _channel.invokeMethod(WLRESOURCEREQUEST_SEND_FORM_PARAMS,
<String, dynamic>{UUID: _uuid, PARAMETERS: formParameters});
} else if (requestBody != null) {
response = await _channel.invokeMethod(
WLRESOURCEREQUEST_SEND_REQUEST_BODY,
<String, dynamic>{UUID: _uuid, BODY: requestBody});
} else {
response = await _channel
.invokeMethod(WLRESOURCEREQUEST_SEND, <String, dynamic>{UUID: _uuid});
}
final MFResponse mfResponse = MFResponse(mfResponse: response);
if ((mfResponse.errorMsg?.isEmpty ?? true) ||
(mfResponse.errorCode?.isEmpty ?? true)) {
return mfResponse;
} else {
throw mfResponse;
}
}