This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/CC3200: error HTTPCli_ESENDFAIL (-103)

Part Number: CC3200

Tool/software: TI C/C++ Compiler

I am suppose to get the response from the server but I am getting the error HTTPCli_ESENDFAIL   (-103). Why post is not happening?

static int HTTPPostMethod(HTTPCli_Handle httpClient, char*post_uri)
{
......
......
moreFlags = 1;
        lRetVal = HTTPCli_sendRequest(httpClient, HTTPCli_METHOD_POST, post_uri, moreFlags);
        if(lRetVal < 0)
        {
            UART_PRINT("Failed to send HTTP POST request header.\n\r");
            return lRetVal;
        }
lastFlag = 1;
        lRetVal = HTTPCli_sendField(httpClient, HTTPCli_FIELD_NAME_CONTENT_LENGTH, (const char *)Post_string_size, lastFlag);
        if(lRetVal < 0)
        {
            UART_PRINT("Failed to send HTTP POST request header.\n\r");
            return lRetVal;
        }
}

I am always getting the negative value from HTTPCli_sendRequest. Can I know why? Where am I wrong to connect with server to post the data?

  • Still stuck into this. I am always getting the "Failed to send HTTP POST request header". Can I know why?
  • Hello,

    Are you connected to the server with no issues? i.e. have you used HTTPCli_connect() which returned OK?

    Have you set some HTTP header fields before issuingthe HTTPCli_sendRequest()? i.e. using HTTPCli_setRequestFields()?

    -103 error means you eventually fails to send the data on socket via Ssock_send(). You can run in debug down the stack and see where you fail in this function.

    Shlomi