Skip to main content
Module

x/oauth4webapi/mod.ts>protectedResourceRequest

OAuth 2 / OpenID Connect for Web Platform API JavaScript runtimes
Go to Latest
function protectedResourceRequest
import { protectedResourceRequest } from "https://deno.land/x/oauth4webapi@v2.3.0/mod.ts";

Performs a protected resource request at an arbitrary URL.

Authorization Header is used to transmit the Access Token value.

Parameters

accessToken: string

The Access Token for the request.

method:
| "GET"
| "POST"
| "PUT"
| "DELETE"
| "PATCH"
| string

The HTTP method for the request.

url: URL

Target URL for the request.

headers: Headers

Headers for the request.

body: RequestInit["body"]

Request body compatible with the Fetch API and the request's method.