Error in Post request

Sir,
I developed a medical app in MIT App inventor. There is an error while sending data from App to the url. I couldn't fix the error. The post request is worked in the postman, and use this post request (https://www.chirpstack.io/application-server/api/http-examples/) for trying to send via MIT app. So, I attached the code and error message.

A dictionary does not convert automatically into JSON... try to put together your JSON manually ...

Also I'm not sure, if the web component is able to post to another port, in your case 8080

Taifun

1 Like

Sir,
I did the post request as per the document suggested by the MIT App. But there is error while sending data.

1 Like

When in companion, run Do It on this block

what is the output ?

use Do it to debug your blocks, see also tip 4 here https://puravidaapps.com/learn.php
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

Sir,
I design a post request section for my Application. So I checked Do it option but it is disabled

.

Please refrain from creating multiple topics on the same issue, you can reply back in the same post.

Do It is only enabled when you are connected to the Companion or an Emulator.

Edit: The post has now been merged.

If you're going to post a result, it's better to do it on the main topic...

Edit: The post has now been merged.

You could expand the comments box so that we can see the entire Do It, or copy the text and paste it here.

1 Like

Do It Result: {"deviceQueueItem":{"confirmed":"false","data":"AQID","fPort":"10"}}

"Looks" OK.

Try passing that json string as a text:

image

1 Like

I tried , But it's not working.

You should run the Do It on the call block, not the Text block.

That will not return an output in a comments box, it will just run the blocks

1 Like

OK ,
But how to avoid this error?

Are you sure your device eui is correct? The chirpstack documentation is somewhat terse but it doesn't show the use of the xx:xx:xx:xx:xx:xx format, just xxxxxxxxxxxxx

1 Like

Device EUI is correct. 00:80:00:00:04:01:4C:E9