Subversion Repositories Tewi

Rev

Rev 20 | Rev 43 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

/* $Id: tw_http.h 32 2024-09-16 12:42:19Z nishi $ */

#ifndef __TW_HTTP_H__
#define __TW_HTTP_H__

#include <stdbool.h>

struct tw_http_request {
        char* method;
        char* path;
        char* query;
        char* version;
        char** headers;
        char* body;
};

struct tw_http_response {
        char** headers;
        int status;
        bool _processed; /* Internal parameter */
};

#ifdef SOURCE
#include <openssl/ssl.h>
void tw_free_request(struct tw_http_request* req);
int tw_http_parse(SSL* ssl, int sock, struct tw_http_request* req);
#endif

#endif