Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

return to response #214

Open
do4ng opened this issue Feb 24, 2024 · 0 comments
Open

return to response #214

do4ng opened this issue Feb 24, 2024 · 0 comments
Labels
enhancement New feature or request feature

Comments

@do4ng
Copy link
Contributor

do4ng commented Feb 24, 2024

It can be sent through return rather than through ctx.send

export default [
  GET(() => {
    return { msg: "馃憢" };
  })
]
  • with headers
export default [
  GET(() => {
    const res = response({ msg: "馃憢" }, { /*headers*/ });
    res.body= { msg: "馃帀" };
    res.headers = {};
    res.status = 500;
    return res;
  })
]
@do4ng do4ng added enhancement New feature or request feature labels Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
Status: In review
Development

No branches or pull requests

1 participant