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