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

x/windmill/windmill-api/http/http.ts>ResponseContext

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Go to Latest
class ResponseContext
import { ResponseContext } from "https://deno.land/x/windmill@v1.38.2/windmill-api/http/http.ts";

Constructors

new
ResponseContext(
httpStatusCode: number,
headers: { [key: string]: string; },
)

Methods

getBodyAsAny(): Promise<string | Blob | undefined>

Use a heuristic to get a body of unknown data structure. Return as string if possible, otherwise as binary.

getParsedHeader(headerName: string): { [parameter: string]: string; }

Parse header value in the form value; param1="value1"

E.g. for Content-Type or Content-Disposition Parameter names are converted to lower case The first parameter is returned with the key ""