Need Help for Sending Data to Api using http Put, ESP8266 interfaced with SIM900

Dear experts, I have a problem in sending data to Api interface using PUT. in my project im using both wifi and GSM for sending Data (Either GSM / WIFI selectable). while connecting thro WIFI PUT method working fine but in GSM mode i cant able to send data using CIPSEND. i tried with Postman its working fine. here is the postman data

`
PUT /eapi/Update HTTP/1.1
Host: .149.56.240.98:8080
Cache-Control: no-cache
Postman-Token: a742a5fd-3df3-8664-a027-1a15ca80d0b9

"Lamp:1,status:off"
`

My code is

url="PUT /eapi/Update HTTP/1.1";
      
 url+=" HTTP/1.0\r\n\r\n";
 String svr="AT+CIPSTART=\"TCP\"+",\"149.56.240.98\",8080";
        delay(1000);
        connectGSM(svr,"CONNECT");
        delay(1000);
        int len = url.length();
        String str="";
        str="AT+CIPSEND="+len;
        Serial.println(str);
	delay(1000);
        Serial.print(url);
        delay(1000);
        Serial.write(0x1A);

I received Bad Request 400. i don't know what is the format for sending data using PUT through SIM900. please help

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.