Functions |
const char * | onion_response_code_description (int code) |
int | onion_response_flush (onion_response *res) |
| Writes all buffered output waiting for sending.If header has not been sent yet (delayed), it uses a temporary buffer to send it now. This way header can use the buffer_size information to send the proper content-length, even when it wasnt properly set by programmer. Whith this information its possib to keep alive the connection on more cases.
|
ssize_t | onion_response_write0 (onion_response *res, const char *data) |
| Writes some data to the response. \0 ended string.
|
ssize_t | onion_response_write_html_safe (onion_response *res, const char *data) |
| Writes the given string to the res, but encodes the data using html entitiesThe encoding mens that <html> whould become <html>
|
onion_dict * | onion_response_get_headers (onion_response *res) |
| Returns the headers dictionary, so user can add repeated headersOnly simple use case is to add several coockies; using normal set_header is not possible, but accessing the dictionary user can add repeated headers without problem.
|
void | onion_response_add_cookie (onion_response *res, const char *cookiename, const char *cookievalue, time_t validity_t, const char *path, const char *domain, int flags) |
| Sets a new cookie into the response.
|