Ulfius: src/u_request.c File Reference

Ulfius HTTP Framework for REST Applications in C

Functions
u_request.c File Reference
`#include <ctype.h>`
`#include <stdarg.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <u_private.h>`
`#include <ulfius.h>`
`#include "yuarel.h"`

## Functions
struct _u_endpoint ** | ulfius_endpoint_match (const char *method, const char *url, struct _u_endpoint *endpoint_list)
int | ulfius_parse_url (const char *url, const struct _u_endpoint *endpoint, struct _u_map *map, int check_utf8)
int | ulfius_init_request (struct _u_request *request)
int | ulfius_clean_request (struct _u_request *request)
int | ulfius_clean_request_full (struct _u_request *request)
int | ulfius_copy_request (struct _u_request *dest, const struct _u_request *source)
int | ulfius_set_request_properties (struct _u_request *request,...)
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)
struct _u_request * | ulfius_duplicate_request (const struct _u_request *request)
char * | ulfius_export_request_http (const struct _u_request *request)
int | ulfius_set_json_body_request (struct _u_request *request, json_t *j_body)
json_t * | ulfius_get_json_body_request (const struct _u_request *request, json_error_t *json_error)
char * | ulfius_export_client_certificate_pem (const struct _u_request *request)
int | ulfius_import_client_certificate_pem (struct _u_request *request, const char *str_cert)

## Function Documentation

## ◆ ulfius_endpoint_match()

struct _u_endpoint ** ulfius_endpoint_match | ( | const char * | method,
|  | const char * | url,
|  | struct _u_endpoint * | endpoint_list
| ) |  |

ulfius_endpoint_match return the endpoint array matching the url called with the proper http method the returned array always has its last value to NULL return NULL on memory error returned value must be free'd after use

## ◆ ulfius_parse_url()

int ulfius_parse_url | ( | const char * | url,
|  | const struct _u_endpoint * | endpoint,
|  | struct _u_map * | map,
|  | int | check_utf8
| ) |  |

ulfius_parse_url fills map with the keys/values defined in the url that are described in the endpoint format url return U_OK on success