Skip to main content
Module

std/node/url.ts>urlToHttpOptions

Deno standard library
Go to Latest
function urlToHttpOptions
import { urlToHttpOptions } from "https://deno.land/std@0.166.0/node/url.ts";

This utility function converts a URL object into an ordinary options object as expected by the http.request() and https.request() APIs.

Parameters

url: URL

The WHATWG URL object to convert to an options object.

Returns

HttpOptions

HttpOptions