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

x/blocks/utils/http.ts>bodyFromUrl

Open-Source web editor based on Preact, Tailwind and TypeScript. The other side of code.
Go to Latest
variable bodyFromUrl
import { bodyFromUrl } from "https://deno.land/x/blocks@0.36.7/utils/http.ts";

Parses the specified @param param from querystring of the given @param url. if the parameter is specified so the payload is parsed by decoding the parameter from base64 and parsing as a Json usin JSON.parse, otherwise all query parameters are used to mount an object using the dot notation format (a.b=10 generates { a :{ b:10 }}).

type

(param: string, url: URL) => Record<string, any>