Request.functions.toHeadersRecord
fx-fetch / Request / toHeadersRecord
Function: toHeadersRecord()
Section titled “Function: toHeadersRecord()”toHeadersRecord(
self):object
Defined in: packages/fx-fetch/src/Request/toHeadersRecord.ts:22
Gets the headers of the request.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”object
Example
Section titled “Example”import { Request } from 'fx-fetch';
const request = Request.make({ url: 'https://api.example.com', headers: { 'Content-Type': 'application/json' }});const headers = Request.toHeadersRecord(request);console.log(headers); // { 'content-type': 'application/json' }0.1.0