Skip to content

Add documentation how to add headers to response #687

@sebastianesch

Description

@sebastianesch

Hi,

it would be nice to explain in https://github.com/cap-js/docs/blob/main/node.js/events.md#class-cdsrequest--cds-request-, how to return custom response headers.

I think the correct way would be using req.res.setHeader(), but I think from the past, there are a lot of examples in the wild, that use private APIs like e.g. https://community.sap.com/t5/technology-q-a/how-to-add-header-in-cap-service-response/qaq-p/12674871#M4755468 or here https://community.sap.com/t5/technology-q-a/add-response-headers-in-sap-cap/qaq-p/12644749#M4743715.

Kind regards,
Sebastian

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions