#include "Types.h"
#include <stdio.h>
Go to the source code of this file.
|
| const char * | dynxx_net_http_request (const char *url, const char *params, DynXXHttpMethod method, const char **header_v, size_t header_c, const char **form_field_name_v, const char **form_field_mime_v, const char **form_field_data_v, size_t form_field_count, FILE *cFILE, size_t file_size, size_t timeout) |
| | http request
|
| |
| bool | dynxx_net_http_download (const char *url, const char *file_path, size_t timeout) |
| | download file
|
| |
◆ DynXXHttpMethod
HTTP method
| Enumerator |
|---|
| DynXXHttpMethodGet | |
| DynXXHttpMethodPost | |
| DynXXHttpMethodPut | |
◆ dynxx_net_http_download()
| bool dynxx_net_http_download |
( |
const char * |
url, |
|
|
const char * |
file_path, |
|
|
size_t |
timeout |
|
) |
| |
download file
- Parameters
-
| url | file URL |
| file_path | file path |
| timeout | Timeout(milliseconds) |
- Returns
- download result
◆ dynxx_net_http_request()
| const char * dynxx_net_http_request |
( |
const char * |
url, |
|
|
const char * |
params, |
|
|
DynXXHttpMethod |
method, |
|
|
const char ** |
header_v, |
|
|
size_t |
header_c, |
|
|
const char ** |
form_field_name_v, |
|
|
const char ** |
form_field_mime_v, |
|
|
const char ** |
form_field_data_v, |
|
|
size_t |
form_field_count, |
|
|
FILE * |
cFILE, |
|
|
size_t |
file_size, |
|
|
size_t |
timeout |
|
) |
| |
http request
- Parameters
-
| url | URL |
| params | params(transfer multiple params like v1=a&v2=b) |
| method | HTTP method, see DynXXHttpMethod |
| header_v | HTTP header vector, max length is DYNXX_HTTP_HEADER_MAX_LENGTH |
| header_c | HTTP header count, max count is DYNXX_HTTP_HEADER_MAX_COUNT |
| form_field_name_v | Form field name vector, max length is DYNXX_HTTP_FORM_FIELD_NAME_MAX_LENGTH |
| form_field_mime_v | Form field mime vector, max length is DYNXX_HTTP_FORM_FIELD_MIME_MAX_LENGTH |
| form_field_data_v | Form field data bytes vector, max length is DYNXX_HTTP_FORM_FIELD_DATA_MAX_LENGTH |
| form_field_count | Form field count, max ount is DYNXX_HTTP_FORM_FIELD_MAX_COUNT |
| cFILE | A FILE (pointer) to PUT |
| file_size | File size |
| timeout | Timeout(milliseconds) |
- Returns
- response