Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Conversation

@CameronNg
Copy link
Contributor

Issue link: #465

@CameronNg CameronNg requested a review from tikikun April 10, 2024 03:40

inline drogon::HttpResponsePtr nitroHttpResponse() {
auto resp = drogon::HttpResponse::newHttpResponse();
auto resp = drogon::HttpResponse::newHttpResponse(drogon::k200OK, drogon::CT_APPLICATION_JSON);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@tikikun tikikun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

LOG_INFO << "Respond for all cors!";
resp->addHeader("Access-Control-Allow-Origin", "*");
#endif
resp->setContentTypeString("application/json");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be Content-Type: text/event-stream

@tikikun tikikun merged commit 088d9b7 into main Apr 10, 2024
@louis-jan louis-jan deleted the 465-fix-http-res-content-type-v2 branch July 8, 2024 04:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants