Ulfius
HTTP Framework for REST Applications in C
|
Functions | |
int | ulfius_add_header_to_response (struct _u_response *response, const char *key, const char *value) |
int | ulfius_set_string_body_request (struct _u_request *request, const char *string_body) |
int | ulfius_set_binary_body_request (struct _u_request *request, const char *binary_body, const size_t length) |
int | ulfius_set_empty_body_request (struct _u_request *request) |
int | ulfius_set_string_body_response (struct _u_response *response, const unsigned int status, const char *body) |
int | ulfius_set_binary_body_response (struct _u_response *response, const unsigned int status, const char *body, const size_t length) |
int | ulfius_set_empty_body_response (struct _u_response *response, const unsigned int status) |
URL, POST and Header management functions
int ulfius_add_header_to_response | ( | struct _u_response * | response, |
const char * | key, | ||
const char * | value | ||
) |
ulfius_add_header_to_response add a header to the response
response | the response to be updated |
key | the key of the header |
value | the value of the header |
ulfius_add_header_to_response add a header to the response return U_OK on success
int ulfius_set_string_body_request | ( | struct _u_request * | request, |
const char * | string_body | ||
) |
ulfius_set_string_body_request Set a string string_body to a request, replace any existing body in the request
request | the request to be updated |
string_body | string to set to the body response must end with a '\0' character |
ulfius_set_string_body_request Set a string string_body to a request string_body must end with a '\0' character return U_OK on success
int ulfius_set_binary_body_request | ( | struct _u_request * | request, |
const char * | binary_body, | ||
const size_t | length | ||
) |
ulfius_set_binary_body_request Set a binary binary_body to a request, replace any existing body in the request
request | the request to be updated |
binary_body | an array of char to set to the body response |
length | the length of binary_body to set to the request body return U_OK on success |
ulfius_set_binary_body_request Add a binary binary_body to a request return U_OK on success
int ulfius_set_empty_body_request | ( | struct _u_request * | request | ) |
ulfius_set_empty_body_request Set an empty request body
request | the request to be updated |
ulfius_set_empty_body_request Set an empty request body return U_OK on success
int ulfius_set_string_body_response | ( | struct _u_response * | response, |
const unsigned int | status, | ||
const char * | string_body | ||
) |
ulfius_set_string_body_response Add a string body to a response, replace any existing body in the response
response | the response to be updated |
status | the http status code to set to the response |
body | the string body to set, must end with a '\0' character |
ulfius_set_string_body_response Set a string string_body to a response string_body must end with a '\0' character return U_OK on success
int ulfius_set_binary_body_response | ( | struct _u_response * | response, |
const unsigned int | status, | ||
const char * | binary_body, | ||
const size_t | length | ||
) |
ulfius_set_binary_body_response Add a binary body to a response, replace any existing body in the response
response | the response to be updated |
status | the http status code to set to the response |
body | the array of char to set |
length | the length of body to set to the request body |
ulfius_set_binary_body_response Add a binary binary_body to a response return U_OK on success
int ulfius_set_empty_body_response | ( | struct _u_response * | response, |
const unsigned int | status | ||
) |
ulfius_set_empty_body_response Set an empty response with only a status
response | the response to be updated |
status | the http status code to set to the response |
ulfius_set_empty_body_response Set an empty response with only a status return U_OK on success