Skip to content

HTTPClient.Post returns HTTPC_ERROR_SEND_PAYLOAD_FAILED #2815

@yolofy

Description

@yolofy

I'm doing a post call from my esp8266 to a dotnetcore rest api.
I (sometimes) get HTTPCode -3 when posting to the rest api.

The issue is resolved when I delay the rest call (server side) with 1000ms. The lower I set this delay the more likely it is I get this error. When the response time is <1ms I always get the error.

I'm using this board: https://www.olimex.com/Products/IoT/ESP8266-EVB/open-source-hardware

if((WiFiMulti.run() == WL_CONNECTED)) {
    HTTPClient http;
    http.begin("http://192.168.178.27:5102/api/Doorbell/Ring");
    int httpCode = http.POST("{}");
    Serial.println(httpCode);
    String payload = http.getString();
    Serial.println(payload);

    http.end();
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting for feedbackWaiting on additional info. If it's not received, the issue may be closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions