Add simplified client API (http_get, http_put, http_post, http_delete)
This commit is contained in:
@@ -1058,6 +1058,24 @@ void http_client_wait_response(HTTP_Client *client,
|
||||
// again after this.
|
||||
void http_free_response(HTTP_Response *response);
|
||||
|
||||
// Perform a blocking GET request
|
||||
int http_get(HTTP_String url, HTTP_String *headers,
|
||||
int num_headers, HTTP_Response **response);
|
||||
|
||||
// Perform a blocking POST request
|
||||
int http_post(HTTP_String url, HTTP_String *headers,
|
||||
int num_headers, HTTP_String body,
|
||||
HTTP_Response **response);
|
||||
|
||||
// Perform a blocking PUT request
|
||||
int http_put(HTTP_String url, HTTP_String *headers,
|
||||
int num_headers, HTTP_String body,
|
||||
HTTP_Response **response);
|
||||
|
||||
// Perform a blocking DELETE request
|
||||
int http_delete(HTTP_String url, HTTP_String *headers,
|
||||
int num_headers, HTTP_Response **response);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// src/server.h
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user