Newer
Older
Import / applications / HighwayDash / ports / Framework / HttpClient.h~
@John Ryland John Ryland on 22 Dec 2020 816 bytes import NUC files
#ifndef HTTP_CLIENT_H
#define HTTP_CLIENT_H
 
#include <string>
#include <vector>
#include <map>
#include <stdint.h>


/*
enum HTTPResult {
    HTTP_OK = 0,        ///<Success
    HTTP_PROCESSING,    ///<Processing
    HTTP_PARSE,         ///<url Parse error
    HTTP_DNS,           ///<Could not resolve name
    HTTP_PRTCL,         ///<Protocol error
    HTTP_NOTFOUND,      ///<HTTP 404 Error
    HTTP_REFUSED,       ///<HTTP 403 Error
    HTTP_ERROR,         ///<HTTP xxx error
    HTTP_TIMEOUT,       ///<Connection timeout
    HTTP_CONN,          ///<Connection error
    HTTP_CLOSED,        ///<Connection was closed by remote host
};
*/


int MakeHttpRequest(std::vector<uint8_t>& response, const char* a_method, const char* a_url, const std::map<std::string,std::string>& args);
 

#endif // HTTP_CLIENT_H