I'm trying to do a POST with DART and I'm getting this error, for now I just want to print the message on server side to be sure that I'm receiving it, but I don't know how to interpretate the error:
- in Server Side:
[WARNING] rpc: Response Status Code: 500 Headers: access-control-allow-credentials: true access-control-allow-origin: * cache-control: no-cache, no-store, must-revalidate content-type: application/json; charset=utf-8 expires: 0 pragma: no-cache Exception: RPC Error with status: 500 and message: Invalid argument(s)
At my client side in DART I have this code:
async.Future<core.List> loadFiles(heatMapMessages request){
var _url=null;
var _queryParams = new core.Map();
var _uploadMedia = null;
var _uploadOptions = null;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body = null;
if (request != null) {
_body = convert.JSON.encode(converterClass.toJson(request));
}
_url = "load";
var _response = _requester.request(_url, "POST",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => converterClass.fromJson(data));
}
And receiving it on my server Side as:
@ApiMethod(method: 'POST', path: 'load')
Future<List<String>> loadFiles(heatMapMessages filename1) async{
print("test "+filename1.jsonInfo);
}