WEB API network request failed

I have create a web api.
The GET method works fine but I take error in the POST method .

My GET block is the following:

My POST block is the following:

I believe is something with the Token but I don’t know to solve it.

What’s the error?

Network request failed

Did you try on the companion app or in the web viewer?

I tried also by downloading the app to my mobile and also with the live test on device.
I know that the web preview doesn’t work normally for the non https api’s.

You likely need to set a content-type in your header so your api knows that you late passing that data in Json format

Content-type: application/json

1 Like

Just did it.
Same error Network request failed

And i want to mention that with the postman works!!!

Instead of using the join text block. Try using create json from object and the create object blocks. Creating json using join text blocks can be tricky. The post method might be failing due to how the json is formatted when you write it with join blocks.

I think this is not the problem because I can’t reach the SAP.
Something with the token is, I believe. I am trying to find it but unfortunately with no luck because I am very new to thunkable.

If you link your project we might be able to help you more :grinning:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.