Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/xserver/src/mod.ts>Context

X-Server a Deno server module with middleware
Go to Latest
class Context
Re-export
import { Context } from "https://deno.land/x/xserver@5.1.0/src/mod.ts";

Constructors

new
Context(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)