Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

// Set verbose error result codes.
AT+CMEE=2
OK

// Reset the HTTP profile #0
AT+UHTTP=0
OK

// Set the server domain name
AT+UHTTP=0,1,"httpbin.org"
OK

//
AT+UHTTP=0,9,"1:Authorization:Bearer MY_TOKEN"
OK

AT+UHTTPC=0,1,"/bearer","result.txt"
OK

# Wait of URC 
+UUHTTPCR: 0,1,1

AT+URDFILE="result.txt"
+URDFILE: "result.txt",276,"HTTP/1.1 200 OK
Date: Wed, 23 Oct 2024 16:27:59 GMT
Content-Type: application/json
Content-Length: 52
Connection: close
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

{
  "authenticated": true, 
  "token": "MY_TOKEN"
}
"
OK

  • No labels