#ifndef __HTTP_REQUEST_H__
#define __HTTP_REQUEST_H__

#include "http.h"
#include "processor.h"
#include "stringdictionary.h"

typedef struct s_HttpRequest HttpRequest;

HttpRequest * http_request_new (httpTtrans *trans, Processor *proc);
void http_request_destroy (void *ptr);

const char * http_request_getToken (HttpRequest *resp);
int http_request_getResponse (HttpRequest *resp);
void http_request_setResponse (HttpRequest *resp, int response);

bool http_request_sendRequestStart (HttpRequest *resp);

bool http_request_write (HttpRequest *request, dynTstring *string);

httpTtrans * http_request_getHttpTrans (HttpRequest *resp);

void http_request_setResponseHeaders (HttpRequest *request, StringDictionary *responseHeaders);

void http_request_setStatus (HttpRequest *request, int status, const char *reason);

#endif
