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

x/live/utils/http.ts>bodyFromUrl

Git-based Visual CMS for Deno, </> htmx and Tailwind apps. Deploy on any Deno-compatible host.
Go to Latest
variable bodyFromUrl
import { bodyFromUrl } from "https://deno.land/x/live@1.96.2/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>