+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Member level 3
    Points: 602, Level: 5

    Join Date
    Feb 2017
    Posts
    62
    Helped
    0 / 0
    Points
    602
    Level
    5

    Error Response from server whensending POST request using sim800

    I want to send data to a server using POST method with sim800. When I use POSTMAN, data is sent correctly but when I use the same headers of POSTMAN in the sim800 error is returend from the server and below message is recieved:

    HTTP/1.1 200 OK
    Server: nginx/1.14.0 (Ubuntu)
    Date: Thu, 01 Nov 2018 21:48:40 GMT
    Content-Type: text/html; charset=utf-8
    Content-Length: 5
    Connection: keep-alive

    Error
    CLOSED
    what can be the problem?! I use the below AT commands sequence in sim800:

    Code:
    AT+CGATT=1                
    AT+CIPMUX=0                 
    AT+CSTT="APN","USER","PASS"
    AT+CIICR                    
    AT+CIFSR                    
    AT+CIPSHUT 
    
    AT+CIPSEND=20
    POST /post HTTP/1.1
    Host: **.**.***.***
    Content-Type: application/json
    Content-Length:23
    
    {"postkey":"postvalue"}

    •   AltAdvertisment

        
       

  2. #2
    Junior Member level 1
    Points: 76, Level: 1
    AskSensors's Avatar
    Join Date
    Oct 2018
    Location
    Paris
    Posts
    15
    Helped
    0 / 0
    Points
    76
    Level
    1

    Re: Error Response from server whensending POST request using sim800

    Hello,
    I see the answer of 200 HTTP code (means request received OK).
    But after, it seems that something happens with your nginx server.
    Have you tried to send requests to another server instead. just to verify that your code with SIM8080 works well with other servers.



    •   AltAdvertisment

        
       

  3. #3
    Member level 3
    Points: 602, Level: 5

    Join Date
    Feb 2017
    Posts
    62
    Helped
    0 / 0
    Points
    602
    Level
    5

    Re: Error Response from server whensending POST request using sim800

    Quote Originally Posted by AskSensors View Post
    Hello,
    I see the answer of 200 HTTP code (means request received OK).
    But after, it seems that something happens with your nginx server.
    Have you tried to send requests to another server instead. just to verify that your code with SIM8080 works well with other servers.
    I found that the problem was from the server side that returned error response.



--[[ ]]--