API action ignoring body in GET requests

Another issue with the API action is that it appears to ignore sending the body in GET requests.

This alongside the issue where it fails if the content-type is anything except basic application/json

Is there any plans to acknowledge and perhaps fix these issues ???

A solid API action is surely a fundamental part of any dev kit

Please provide some more detailed information of what exactly are you doing and what the issue is.

I’m make a call to a remote API.

https://api.orthobridge.eu/dr/forms

Headers likes so:

--header 'x-api-key: XXX2HJjyMe5lkWTexBh0264lrSkchpCF7ajXXXX' \
--header 'Content-Type: application/json' \

It’s a GET request and has a body as so:

{
    "auth": {"token": "7165bd8e11b6b971d4gg"}
}

It’s 502’ing- the body isn’t sent with the GET request

I’ve reported this before.

Issues like this are painful as we are having to rework all our Python lambdas to work around Wappler shortcomings

Can you post the exact error message also?

Is this a UI bug (preview API Action) or an actual NodeJS app bug?

I remember doing a bug report of something similar for the UI

It’s an API action issue

I’ve rewritten the Lambda now to use headers …

It was a 502. Works in everything but Wappler API axtion

So just saying 502 and that’s all? No error message nothing?

Yes. I had to change my python code and move the API body to a header to resolve

502 can be different issues. Maybe setup some test server action, send us screenshots how is it defined and the exact error message you are seeing.

I can write another Lambda that exhibits this behaviour if you want to confirm the issue.

There’s also the content-type issue

Can someone check whether or not an API action is sending body content on /GET requests.

Then see how it behaves when the incoming content-type isn’t application/json …

Can you please keep different issues in different topics? It’s hard to follow your issues, when mixing them. A screenshot of your test server action and the exact error returned will be helpful to debug your issue.

The 502 is his non-Wappler endpoint returning an error because Wappler is not sending the request body with a GET request as he intends

I’ll test this in like half hour and report back

Edit: Can’t do this in half hour, have to do so something else first, but this should be verifiable using Beeceptor or something

Thanks Apple.

It’s hard work being a tester. Particularly after reporting these issues on previous occasions!

@Teodor

As I said, I’ve rewritten the Py lambda now - it’s easier and faster than reporting bugs.

On yesterday’s issue, I offered George the API details to try it for himself - but he went dark. So we went and built an intermediate Py API to circumvent that particular issue.

#headache

I was able to recreate the issue. We will check this.

1 Like