Fix windows compilation errors

This commit is contained in:
2025-07-21 12:06:23 +02:00
parent acf4746611
commit 5cb3977c3c
14 changed files with 286 additions and 227 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ int main(void)
http_response_status(res, 200);
// Then zero or more headers
http_response_header(res, "Content-Type: text/plain");
http_response_header(res, HTTP_STR("Content-Type: text/plain"));
// Then you can write zero or more chunks of the response body
http_response_body(res, HTTP_STR("Hello"));
+1 -1
View File
@@ -23,7 +23,7 @@ int main(void)
if (ret < 0) return -1;
http_response_status(res, 200);
http_response_header(res, "Content-Type: text/plain");
http_response_header(res, HTTP_STR("Content-Type: text/plain"));
// The previous example used the *_body function to
// write the response body in chunks:
+2 -2
View File
@@ -21,7 +21,7 @@ int main(void)
// Say we are building a request..
http_response_status(res, 200);
http_response_header(res, "Content-Type: text/plain");
http_response_header(res, HTTP_STR("Content-Type: text/plain"));
// .. and in the middle of building an error condition
// occurs. Maybe a file was missing or an allocation fails.
@@ -39,7 +39,7 @@ int main(void)
// Now we are back to setting the status code
http_response_status(res, 500);
http_response_header(res, "Content-Type: text/plain");
http_response_header(res, HTTP_STR("Content-Type: text/plain"));
http_response_body(res, HTTP_STR("An error occurred!"));
http_response_done(res);
+1 -1
View File
@@ -64,7 +64,7 @@ int main(void)
if (ret < 0) return -1;
http_response_status(res, 200);
http_response_header(res, "Content-Type: text/plain");
http_response_header(res, HTTP_STR("Content-Type: text/plain"));
http_response_body(res, HTTP_STR("Hello"));
http_response_body(res, HTTP_STR(", world!"));
http_response_done(res);