20 lines
411 B
C
20 lines
411 B
C
#include "http/http_response.h"
|
|
#include "http/http_status.h"
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
int main() {
|
|
|
|
char body[BUFSIZ] = "<html><h1>Bonsoir</h1></html>";
|
|
HttpResponse response = {.status_code = HTTP_OK,
|
|
.content_type = HTTP_CT_HTML,
|
|
.content_length = strlen(body),
|
|
.body = body};
|
|
|
|
char out[BUFSIZ];
|
|
construct_response(response, out);
|
|
|
|
printf("%s", out);
|
|
return 0;
|
|
}
|