如何在 oat++ 端点上使用 MIME 代码进行响应

How to response with MIME code on oat++ endpoint

如何在端点响应上设置 MIME 代码?

我看不到任何可用的文档。

您只需在回复中添加 Content-Type header:

auto response = createResponse(Status::CODE_200, "OK");
response->putHeader("Content-Type", "image/jpeg");
return response;