Rev | Line | |
---|
[16] | 1 | /* $Id: tw_http.h 32 2024-09-16 12:42:19Z nishi $ */
|
---|
| 2 |
|
---|
| 3 | #ifndef __TW_HTTP_H__
|
---|
| 4 | #define __TW_HTTP_H__
|
---|
| 5 |
|
---|
[20] | 6 | #include <stdbool.h>
|
---|
| 7 |
|
---|
[16] | 8 | struct tw_http_request {
|
---|
| 9 | char* method;
|
---|
| 10 | char* path;
|
---|
[20] | 11 | char* query;
|
---|
[16] | 12 | char* version;
|
---|
| 13 | char** headers;
|
---|
| 14 | char* body;
|
---|
| 15 | };
|
---|
| 16 |
|
---|
| 17 | struct tw_http_response {
|
---|
| 18 | char** headers;
|
---|
[20] | 19 | int status;
|
---|
| 20 | bool _processed; /* Internal parameter */
|
---|
[16] | 21 | };
|
---|
| 22 |
|
---|
| 23 | #ifdef SOURCE
|
---|
| 24 | #include <openssl/ssl.h>
|
---|
[32] | 25 | void tw_free_request(struct tw_http_request* req);
|
---|
[16] | 26 | int tw_http_parse(SSL* ssl, int sock, struct tw_http_request* req);
|
---|
| 27 | #endif
|
---|
| 28 |
|
---|
| 29 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.