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

x/ayonli_jsext/lib.deno.d.ts>Deno.RequestEvent

A JavaScript extension package for building strong and modern applications.
Latest
interface Deno.RequestEvent
Deprecated
Deprecated

This will be removed in Deno 2.0. See the Deno 1.x to 2.x Migration Guide for migration instructions.

import { type Deno } from "https://deno.land/x/ayonli_jsext@v0.9.72/lib.deno.d.ts";
const { RequestEvent } = Deno;

The event yielded from an HttpConn which represents an HTTP request from a remote client.

Properties

readonly
request: Request

The request from the client in the form of the web platform Request.

Methods

respondWith(r: Response | PromiseLike<Response>): Promise<void>

The method to be used to respond to the event. The response needs to either be an instance of Response or a promise that resolves with an instance of Response.

When the response is successfully processed then the promise returned will be resolved. If there are any issues with sending the response, the promise will be rejected.