createRequest method
Creates an HTTP request in the native HTTP service
requestJson - JSON representation of HttpRequest
Returns JSON with TaskInfo (id, status, path, registrationDate)
Implementation
@override
Future<Map<String, dynamic>> createRequest(
Map<String, dynamic> requestJson) async {
final result = await methodChannel.invokeMethod<Map<Object?, Object?>>(
'createRequest',
requestJson,
);
if (result == null) {
throw PlatformException(
code: 'CREATE_REQUEST_FAILED',
message: 'Failed to create request',
);
}
return Map<String, dynamic>.from(result);
}