Arduino HTTPClient Post

A snippet to get you going with Arduino HTTPClient library … assuming you are on a wifi that can access your.ip.address on port PORT with an api_call programmed into your server to receive HTTP form data in the form of “data_id=somedata&data_create=2019-10-16+14%3A38%3A57&data_value=somemoredata&data_epoch=1571197111584&data_tz=-600”

    #include <HTTPClient.h> 
    HTTPClient httpPost;
    httpPost.begin("http://your.ip.address:PORT/api_call");
    httpPost.addHeader("Content-Type", "application/x-www-form-urlencoded");  //Specify content-type header
    int httpResponseCode = httpPost.POST("data_id=somedata&data_create=2019-10-16+14%3A38%3A57&data_value=somemoredata&data_epoch=1571197111584&data_tz=-600"); //Send the actual POST request