Fix windows compilation errors
This commit is contained in:
@@ -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"));
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user