This TypeScript example renames the Content-Type and Content-Length headers using camel case. Renaming headers can be useful for normalizing field names for testing purposes and mapping fields to different data models.
The example uses JSON data from a GET request to postman-echo.com like this:
The following TypeScript takes the headers from a response variable defined by the Evaluate block. It then maps the Content-Type and Content-Length headers to an object named normalized and renames them using camel case.
To see this TypeScript in an example flow, check out TypeScript example 1: Rename headers with camel case.