Abstract
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); }, },}); Copy
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); }, },});
Static
Makes a request using the specified options.
The options to use when making the request
Private
HTTP client that includes bearer token injection and refresh. This module also supports authorization for policy protected endpoints.
Example: