kndt84 / aws-api-gateway-client

A client module of AWS API gateway both for Node.js and browsers

Home Page:https://www.npmjs.com/package/aws-api-gateway-client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[React Native Android]: Method GET must not have a request body

weekian opened this issue · comments

I'm using this module on my react-native project to connect to my respective AWS services (IAM, lambda, dynamoDB). It seems to be working fine on the IOS side but fails on Android.

const listServices = (id) => api.invokeApi({ id }, '/services/{id}', 'GET', undefined, undefined)

When sending a GET request via the code above, it throws an error 'Method GET must not have a request body'.

  1. Is this module appropriate for react-native? In the documentations, it mentions that this 'module can be used not only for Node.js but for front-end.' Should I be using aws-sdk-js instead?
  2. I replaced 'undefined' with 'null' but that does not solve the issue.It only throws an error on the javascript side. Undefined throws an error on the Java side.

Thank you (in advance) for any assistance!

I see that there's actually a commit 'Fix body for react-native Android GET requests' https://github.com/kndt84/aws-api-gateway-client/commit/54027ee73138ceeff26a17e26e406e56ea2f4005 to fix this issue.

When will the changes be published in a new version?

Published the new version, so please use this.
https://github.com/kndt84/aws-api-gateway-client/releases