When I am using GET the request succeeds.
But when I use POST with a body I get this error response, POST without a body can work
The request signature we calculated does not match the signature you provided. ...
I saw someone mentioned exactly the same issue in amazon-cognito-idenity-dart: https://github.com/jonsaw/amazon-cognito-identity-dart/issues/35
But I tried following code without any luck, any help is appreciated!
final headers = Map<String, String>();
headers["Content-Type"] = "application/json; charset=utf-8";
final signedRequest = SigV4Request(client, method: 'POST', path: path, body: jsonBody, headers: headers);
final response = await http.post(signedRequest.url, headers: signedRequest.headers, body: jsonBody);
When I am using GET the request succeeds. But when I use POST with a body I get this error response, POST without a body can work The request signature we calculated does not match the signature you provided. ... I saw someone mentioned exactly the same issue in amazon-cognito-idenity-dart: https://github.com/jonsaw/amazon-cognito-identity-dart/issues/35 But I tried following code without any luck, any help is appreciated! final headers = Map<String, String>(); headers["Content-Type"] = "application/json; charset=utf-8"; final signedRequest = SigV4Request(client, method: 'POST', path: path, body: jsonBody, headers: headers); final response = await http.post(signedRequest.url, headers: signedRequest.headers, body: jsonBody);