Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 10 months ago.
http post problem ublox c027
Hello, I have an ublox c027 and I won't save my GPS position on my web server white gprs connection.
for example, I'm using (http://ipadress:port/?id=123456&lat=12&lon=45×tamp=3). for saving my position.
When I execute the socket on my web browser that's works. but on my c027 bored, it's not work.
I use HTTPClient_Cellular_HelloWorld project example for test .
#
#
#
##
POST data
HTTPMap map;
HTTPText inText(str, 512);
map.put("id", "111111");
map.put("lat", "12");
map.put("lon", "40");
map.put("timestamp", "3");
printf("\nTrying to post data...\n");
int ret = http.post("http://ipadressServer:port", map, &inText);
if (!ret)
{
printf("Executed POST successfully - read %d characters\n", strlen(str));
printf("Result: %s\n", str);
}
else
{
printf("Error - ret = %d - HTTP return code = %d\n", ret, http.getHTTPResponseCode());
}
#
#
#
##
thanks