Closed raadiy closed 2 years ago
If you mean to set up Content-Type of response:
HttpResponse* response = static_cast<HttpResponse*>(context.response);
response->headers = context.pool->alloc<Header>("Content-Type", "application/json", response->headers);
https://github.com/loentar/ngrest/blob/master/services/favicon/src/Favicon.cpp#L36
It works. Thank you again. Regards Raajesh
Hi Dmitry, Is there a method or function to set the content-type for messages handled using filters (the one i was referring in the other issue today). Right now, inside the service, the response seems to go out as text content-type. Is there a way to set the content-type to json?. Thanks in advance.
==== code snippet ====
====
Regards Raajesh