Skip to content

Request.functions.getReferrerPolicy

fx-fetch


fx-fetch / Request / getReferrerPolicy

getReferrerPolicy(self): NormalizedReferrerPolicy | undefined

Defined in: packages/fx-fetch/src/Request/getReferrerPolicy.ts:22

Gets the referrer policy of the request.

Request

NormalizedReferrerPolicy | undefined

import { Request } from 'fx-fetch';
const request = Request.make({
url: 'https://api.example.com',
referrerPolicy: 'strict-origin-when-cross-origin'
});
const referrerPolicy = Request.getReferrerPolicy(request);
console.log(referrerPolicy); // 'strict-origin-when-cross-origin'

0.1.0