Copyright ©

Mongoose OS Forum


Add header to response

edited September 2016 in Mongoose Networking Library

The old version of Mongoose had this function, which adds a line to the response header:

void mg_send_header(struct mg_connection *, const char *name,
const char *value);

What is the equivalent to this in the new version? The nearest I can find is this:

void mg_send_head(struct mg_connection *n, int status_code,
int64_t content_length, const char *extra_headers);

But this seems totally different. I don't want to set the status code, I don't know the content length, I just want to add a single response header.


Sign In or Register to comment.