Skip to content

Unify how we allow to set headers and status code #1579

Open
@patrick91

Description

@patrick91

So at the moment we have a few integrations and they have a slightly different way to setting headers and status code.

The general idea is the same, we provide a response object in info.context. This object is based on the current integration, this is where the differences between integrations come into play.

I think we should provide a new object (unfortunately we can't replace the current one due to backwards compatibility) that allows to:

  1. set/update response headers
  2. set the status code

Having this could also help us prevent some mistakes, for example, should we allow to set the status code multiple times?

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions