aws-mobile-ionic-sample
aws-mobile-ionic-sample copied to clipboard
GET request error Sigv4
Hi everyone,
In this project, GET requests do not need a body. When I try to adapt GET request to send a body, I get this error: "The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method."
(Sigv4.service.ts) I only change line 17 and 45 to: public get(endpoint, path, body, creds): Observable<Response> { return this.request({ verb: 'GET', endpoint: endpoint, path: path, body: body }, creds) }
// override request body and set to empty when signing GET requests body = (body === undefined ) ? '' : JSON.stringify(body)
I do not know the reason for this error. Anyone can help me? Thanks to all.