Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Add header to response

jvjv
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.

Comments

Sign In or Register to comment.