Gemalto is now part of the Thales Group, find out more.

You are here

BGS2T Question - How to read a response body after an HTTP post | Thales IoT Developer Community

October 29, 2019 - 12:18pm, 1446 views

Hi there,

When I post to the ubidots server, I get the following response from the modem after the AT^SISO=2 command: (After following the steps for an http post)

13:09:13]AT^SISO=2

13:09:13]OK

13:09:16]^SIS: 2, 0, 2201, "HTTP/1.1 200 OK"

13:09:16]^SISR: 2, 1

When I post the same data using an API tester, I receive the following feedback:

Response Headers

HTTP/1.1 200 OK

Server: nginx

Date: Tue, 29 Oct 2019 11:08:38 GMT

Content-Type: application/json

Transfer-Encoding: chunked

Connection: keep-alive

Allow: GET, POST, HEAD, OPTIONS

Vary: Origin, Cookie

Response Body

{"var1": [{"status_code": 201}], "var2": [{"status_code": 201}], "var3": [{"status_code": 201}], "var4": [{"status_code": 201}], "var5": [{"status_code": 201}], "var6": [{"status_code": 201}], "var7": [{"status_code": 201}], "var8": [{"status_code": 201}], "var9": [{"status_code": 201}], "var10": [{"status_code": 201}]}

Is there any way to read the response body using the BGS2T modem? 

Thank you!

-Hermann