簡體   English   中英

如何在 oat++ 端點上使用 MIME 代碼進行響應

[英]How to response with MIME code on oat++ endpoint

如何在端點響應上設置 MIME 代碼?

我沒有看到有關可用的文檔。

它在端點信息中

您只需要在響應中添加一個Content-Type標頭:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM