Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/oauth4webapi/mod.ts>protectedResourceRequest

OAuth 2 / OpenID Connect for JavaScript Runtimes
Go to Latest
function protectedResourceRequest
import { protectedResourceRequest } from "https://deno.land/x/oauth4webapi@v2.7.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.

optional
body:
| Blob
| ArrayBufferView
| ArrayBuffer
| string
| null

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