x/servest@v1.3.4/mod.ts

🌾A progressive http server for Deno🌾
Latest
benchmarkfixturesmiddlewaresitetoolstypesvendor
mod.ts (default module)
c
ConnectionClosedError
c
RoutingError
c
TimeoutError
c
UnexpectedEofError
E
Loglevel
v
contentTypeFilter
v
kDefaultKeepAliveTimeout
f
basicAuth
f
buildCacheControlHeader
f
contentTypeByExt
f
cookieSetter
f
cookieToString
f
createAgent
f
createApp
f
createBodyParser
f
createDataHolder
f
createLogger
f
createRecorder
f
createResponder
f
createRouter
f
extByContentType
f
handleKeepAliveConn
f
initServeOptions
f
listenAndServe
f
listenAndServeTls
f
namedLogger
f
parseCookie
f
parseKeepAlive
f
parserMultipartRequest
f
parseSetCookie
f
parseUrlEncodedForm
f
readRequest
f
readResponse
f
serveJsx
f
serveStatic
f
setLevel
f
setupBody
f
setupBodyInit
f
writeBody
f
writeHeaders
f
writeRequest
f
writeResponse
I
Agent
I
AgentOptions
I
AgentSendOptions
I
App
I
AppOptions
I
BasicAuthOption
I
BodyParser
I
BodyReader
I
CacheControlOptions
I
ClientRequest
I
ClientResponse
I
Cookie
I
CookieSetter
I
DataHolder
I
DFC
I
ErrorHandler
I
IncomingRequest
I
IncomingResponse
I
KeepAlive
I
Logger
I
NamedLogger
I
Responder
I
ResponseRecorder
I
Route
I
RouteHandler
I
Router
I
ServeHandler
I
ServeOptions
I
ServerRequest
I
ServerResponse
I
ServeStaticOptions
I
SetCookieOpts
I
WebSocketHandler
T
HttpBody
T
ServeListener
agent.ts
f
createAgent
I
Agent
I
AgentOptions
I
AgentSendOptions
app.ts
f
createApp
I
App
I
AppOptions
body_parser.ts
f
createBodyParser
f
parserMultipartRequest
f
parseUrlEncodedForm
I
BodyParser
cookie.ts
f
cookieSetter
f
cookieToString
f
parseCookie
f
parseSetCookie
I
Cookie
I
CookieSetter
I
SetCookieOpts
data_holder.ts
f
createDataHolder
I
DataHolder
error.ts
c
ConnectionClosedError
c
RoutingError
c
TimeoutError
c
UnexpectedEofError
jsx.ts
I
DFC
logger.ts
E
Loglevel
f
createLogger
f
namedLogger
f
setLevel
I
Logger
I
NamedLogger
media_types.ts
f
contentTypeByExt
f
extByContentType
middleware.ts
v
contentTypeFilter
f
basicAuth
I
BasicAuthOption
responder.ts
f
createResponder
I
Responder
router.ts
f
createRouter
I
ErrorHandler
I
Route
I
RouteHandler
I
Router
I
WebSocketHandler
serve_jsx.ts
f
serveJsx
serve_static.ts
f
buildCacheControlHeader
f
serveStatic
I
CacheControlOptions
I
ServeStaticOptions
serveio.ts
v
kDefaultKeepAliveTimeout
f
initServeOptions
f
parseKeepAlive
f
readRequest
f
readResponse
f
setupBody
f
setupBodyInit
f
writeBody
f
writeHeaders
f
writeRequest
f
writeResponse
server.ts
f
handleKeepAliveConn
f
listenAndServe
f
listenAndServeTls
I
BodyReader
I
ClientRequest
I
ClientResponse
I
IncomingRequest
I
IncomingResponse
I
KeepAlive
I
ServeHandler
I
ServeOptions
I
ServerRequest
I
ServerResponse
T
HttpBody
T
ServeListener
testing.ts
f
createRecorder
I
ResponseRecorder
import * as mod from "https://dotland.deno.dev/x/servest@v1.3.4/mod.ts";

Classes

error that is thrown when tcp connection is closed

Variables

Deny requests with 400 if content-type doesn't match

Functions

Basic Auth middleware

Create App

Create dummy request & responder that records a response from HTTPHandler

create ServerResponder object

Try to continually read and process requests from keep-alive connection.

Parse multipart/form-data request

Parse application/x-www-form-urlencoded request

Read http request from reader. 'status-line' and headers are certainly read. body and trailers may not be read. Read will be aborted when opts.cancel is called or any read wait to reader is over opts.readTimeout.

read http response from reader

Serve jsx/tsx by dynamic import

Serve static files in specified directory.

write http body to writer. Reader without contentLength will be written by chunked encoding

write headers to writer

write http request. Host, Content-Length, Transfer-Encoding headers are set if needed

write http response to writer. Content-Length, Transfer-Encoding headers are set if needed

Interfaces

keep-alive http agent for single host. each message will be sent in serial

http agent send options

request data for building http request to server

Global error handler for requests

Incoming http request for handling request from client

Incoming http response from server to client

Basic responder for http response

Router handler

serve options

Outgoing http response for building request to server

response data for building http response to client

WebSocket Handler