mongoose/docs/c-api/http_server.h/mg_send_response_line.md
Sergey Lyubka 12437fd7fe Refactor Mongoose documentation
PUBLISHED_FROM=e9a4e5c7b4a1d03b93a2a79e29de19e60e919929
2016-09-01 14:35:02 +00:00

575 B

title decl_name symbol_kind signature
mg_send_response_line() mg_send_response_line func void mg_send_response_line(struct mg_connection *c, int status_code, const char *extra_headers);

Sends the response status line. If extra_headers is not NULL, then extra_headers are also sent after the reponse line. extra_headers must NOT end end with new line. Example:

 mg_send_response_line(nc, 200, "Access-Control-Allow-Origin: *");

Will result in:

 HTTP/1.1 200 OK\r\n
 Access-Control-Allow-Origin: *\r\n