mco_lews_append_http_header

Prototype

    MCO_RET mco_lews_append_http_header(lews_connection_context_h client_ctx_handle, int http_status_code, const char *content_type);

Arguments

client_ctx_handle
The connection context handle.
http_status_code
The HTTP response code.
content_type
The response content type (e.g., 'text/html', 'application/json').

Description

The mco_lews_append_http_header() function prepares and adds an HTTP response header to the outgoing buffer.

Return Codes

MCO_S_OK
No errors.
MCO_E_NW_SENDERR
Error occurred while sending the response.

Files

Header file:
mcoewslite.h
Source file:
mcoewslite.c
Library:
mcoewslite.a