Skip to main content
Module

x/deco/mod.ts>HttpServer

Deco is a utility library for Deno developers
Very Popular
Go to Latest
class HttpServer
import { HttpServer } from "https://deno.land/x/deco@0.9.5.1/mod.ts";

Static Methods

After(hook: (response: HttpResponse) => Promise<HttpResponse>)
Auth(unnamed 0: { authKey: CryptoKey; headerKey?: string; })
Before(hook: (request: HttpRequest) => Promise<HttpRequest>)
Chunked(contentType?)
Decorate(decorators: Array<(
target: any,
property: string,
descriptor: PropertyDescriptor,
) => void>
)
Delete(path?: string)
Get(path?: string)
Hook(hook: any, type: HttpServerHookType)
Options(path?: string)
Post(path?: string)
Put(path?: string)
Route(unnamed 0: { method?: HttpMethod; path?: string; })
serve(unnamed 0: { hostname?: string; port?: number; abortSignal?: AbortSignal; controllers: Function[]; onStarted?: () => void; onError?: (e: unknown) => void; onClosed?: () => void; })
SSE(event: EventStreamEventFormat | EventStreamCommentFormat): string
Static(unnamed 0: { assets: Array<{ fileName: string; path?: string; contentType: string; }>; path?: string; })
Status(status: number)