maheshece28
Junior Member level 2
I'm trying to do a POST method in my PIC24F which is interfaced with M95 Quectel module. I've successfully done the post method. Now in the server side added the security i.e authorization. In M95 Quectel module HTTP datasheet doesn't mention the authorisation. They have mentioned only httpurl, httppost, httpread and httpget. I have tried to send the username and password as payload in httpost for authorization, failed. Authorization type is "Basic Auth" Below is my code without authorization.
Thanks
Code:
#define HTTP_POST_URL_HS="http://api...."
if(SendAtCommand_Response("AT+QHTTPURL=35,30\r","CONNECT",500))
{
uart1str("URL is set\r\n");
clear();
if(SendAtCommand_Response(HTTP_POST_URL_HS ,"OK",500))
{
uart1str("URL Sent\r\n");
if(SendAtCommand_Response("AT+QHTTPPOST=90,25,10\r","CONNECT",1000))
{
SendAtCommand_Response("__uuid=MQtNRZ&__deviceid=865733028409765&Latitude=13.98456&Longitude=80.06023&dc_volt=12.7","OK",100);
uart1str("Posted!!!");
}
}
}
Thanks