Class HttpClientAbstract

HTTP client that includes bearer token injection and refresh. This module also supports authorization for policy protected endpoints.

Example:

return forgerock.HttpClient.request({
url: `https://example.com/protected/resource`,
init: {
method: 'GET',
credentials: 'include',
},
authorization: {
handleStep: async (step) => {
step.getCallbackOfType('PasswordCallback').setPassword(pw);
return Promise.resolve(step);
},
},
});

Constructors

Methods

  • Parameters

    • headers: Headers
    • forceRenew: boolean

    Returns Promise<Headers>