Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to response with MIME code on oat++ endpoint

Tags:

oat++

How do I set the MIME code on a endpoint response?

I see no documentation about that available.

like image 962
Samega 7Cattac Avatar asked Oct 27 '25 03:10

Samega 7Cattac


1 Answers

You just have to add a Content-Type header to the response:

auto response = createResponse(Status::CODE_200, "OK");
response->putHeader("Content-Type", "image/jpeg");
return response;
like image 106
lganzzzo Avatar answered Oct 30 '25 15:10

lganzzzo