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

x/xserver/src/context.ts>default

X-Server a Deno server module with middleware
Go to Latest
class default
import { default } from "https://deno.land/x/xserver@5.2.2/src/context.ts";

Constructors

new
default(request: Request)

Properties

accepted
alreadyReported
badGateway
badRequest
codes
conflict
continue
created
earlyHints
expectationFailed
failedDependency
forbidden
found
gatewayTimeout
gone
headers: Headers
httpVersionNotSupported
imUsed
insufficientStorage
internalServerError
lengthRequired
locked
loopDetected
method: Method
methodNotAllowed
misdirectedRequest
movedPermanently
multipleChoices
multiStatus
networkAuthenticationRequired
noContent
nonAuthoritativeInfo
notAcceptable
notExtended
notFound
notImplemented
notModified
ok
partialContent
paymentRequired
permanentRedirect
preconditionFailed
preconditionRequired
processing
proxyAuthRequired
redirect
request: Request
requestedRangeNotSatisfiable
requestEntityTooLarge
requestHeaderFieldsTooLarge
requestTimeout
requestURITooLong
resetContent
seeOther
serviceUnavailable
switchingProtocols
teapot
temporaryRedirect
tooEarly
tool: Record<string, any>
tooManyRequests
unauthorized
unavailableForLegalReasons
unprocessableEntity
unsupportedMediaType
upgradeRequired
url: URL
useProxy
variantAlsoNegotiates

Methods

body(body: Body): this
code(code: Status): this
end(
code?: Status,
body?: Body,
head?: Record<string, string>,
): Response
get(name: string)
head(head: Record<string, string>): this
html(strings: TemplateStringsArray, ...variables: unknown[]): Response
message(message: string): this
set(name: string, value: unknown)