samples: net: http_server: Add example of passing Content-Type field
Show how to pass Content-Type header field to client. Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit is contained in:
parent
6d129b2a2d
commit
aad76a9416
1 changed files with 1 additions and 0 deletions
|
@ -31,6 +31,7 @@ struct http_resource_detail_static index_html_gz_resource_detail = {
|
||||||
.type = HTTP_RESOURCE_TYPE_STATIC,
|
.type = HTTP_RESOURCE_TYPE_STATIC,
|
||||||
.bitmask_of_supported_http_methods = BIT(HTTP_GET),
|
.bitmask_of_supported_http_methods = BIT(HTTP_GET),
|
||||||
.content_encoding = "gzip",
|
.content_encoding = "gzip",
|
||||||
|
.content_type = "text/html",
|
||||||
},
|
},
|
||||||
.static_data = index_html_gz,
|
.static_data = index_html_gz,
|
||||||
.static_data_len = sizeof(index_html_gz),
|
.static_data_len = sizeof(index_html_gz),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue