2015-03-23 05:57 AM
Hi All,
I'm evaluating the SPWF01, so I want to send an Android GCM HTTP post (json or plain text) - but I've no success. I tried it with: AT+S.HTTPPOST=android.googleapis.com,/gcm/send,Content-Type:application/x-www-form-urlencoded;charset=UTF-8&Authorization:key=APIKEY,80 and also with: AT+S.HTTPPOST=android.googleapis.com,/gcm/send,Content-Type:application/json&Authorization:key=APIKEY,80 I got following answer: HTTP/1.0 401 Unauthorized Has anybody an idea or can give me an example how to send the http header via the SPWF AT command? Best regards, Flo #http-post #spwf #gcm2016-07-04 02:38 AM
Format properly HTTP header, and JSON content. Put ''CrLfCrLf'' between header and content, and append ''CrLfCrLf'' after content.
Mind the header fields: http://www.json.org/JSONRequest.html