Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/live/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/live@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>