Search.../

headers

Returns the HTTP header fields used in a call to an HTTP function.

Description

The headers property returns an object of key:value pairs where the key is the header field name and the value is the header field value.

Headers are returned in lowercase, regardless of how they were sent by the function caller.

Type:

ObjectRead Only

Was this helpful?

Get the headers from a call to an HTTP function

Copy Code
1// In http-functions.js
2
3export function use_myFunction(request) {
4
5 let headers = request.headers;
6 // {"content-type": "application/json"}
7
8}