request.c 520 Bytes
#include <stdlib.h>

#include "cclass.h"
#include "http/request.h"

INIT_CLASS(HTTP_REQUEST);

static void
_free(void ** data)
{
	if (NULL != *data) {
		free(*data);
	}
}

__construct(LOGGER) {}

__destruct(LOGGER)
{
	int i;

	_free(&(this->http_version));
	_free(&(this->uri));
	_free(&(this->method));

	for (i=0; i<128; i++) {
		_free(&((this->header)[i].name));
		_free(&((this->header)[i].value));
	}

	_free(&(this->body));
} 

__jsonConst(LOGGER) {}
__toJson(LOGGER) {}
__clear(LOGGER) {}

// vim: set ts=4 sw=4: