2024-09-13 15:09:52 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
#ifndef __TW_HTTP_H__
|
|
|
|
#define __TW_HTTP_H__
|
|
|
|
|
2024-09-14 09:59:15 +00:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2024-09-13 15:09:52 +00:00
|
|
|
struct tw_http_request {
|
|
|
|
char* method;
|
|
|
|
char* path;
|
2024-09-14 09:59:15 +00:00
|
|
|
char* query;
|
2024-09-13 15:09:52 +00:00
|
|
|
char* version;
|
|
|
|
char** headers;
|
|
|
|
char* body;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct tw_http_response {
|
|
|
|
char** headers;
|
2024-09-14 09:59:15 +00:00
|
|
|
int status;
|
|
|
|
bool _processed; /* Internal parameter */
|
2024-09-13 15:09:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef SOURCE
|
|
|
|
#include <openssl/ssl.h>
|
|
|
|
int tw_http_parse(SSL* ssl, int sock, struct tw_http_request* req);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|