batman
This commit is contained in:
19
main.c
Normal file
19
main.c
Normal file
@@ -0,0 +1,19 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user