Commit | Line | Data |
---|---|---|
2340bcd3 JVH |
1 | #ifndef HTTP_RESPONSE_H |
2 | #define HTTP_RESPONSE_H | |
3 | ||
4 | typedef struct http_response_s http_response_t; | |
5 | ||
6 | http_response_t *http_response_init(const char *protocol, int code, const char *message); | |
7 | ||
8 | void http_response_add_header(http_response_t *response, const char *name, const char *value); | |
9 | void http_response_finish(http_response_t *response, const char *data, int datalen); | |
10 | ||
11 | const char *http_response_get_data(http_response_t *response, int *datalen); | |
12 | ||
13 | void http_response_destroy(http_response_t *response); | |
14 | ||
15 | #endif |