You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Encode(any) error (encode and write to response body)
don.Header Methods:
Get(string) string
Values(string) []string
Add(k,v string)
Set(k,v string)
Range(f func(k,v string))
don.Params Methods:
Get(string) string
Values(string) []string
Range(f func(k,v string))
Use this interface in middleware and handlers that don't use don.H. Old style handlers using the fasthttp request directly should also still be supported via an adapter.
This will allow don to also run on standard lib net/http down the line by creating a second implementation of don.Context that wraps the standard lib request & response writer.
The text was updated successfully, but these errors were encountered:
Create a
don.Context
interface with an implementation that calls out tofasthttp
.don.Context
Methods:context.Context
io.Reader
(reads from request body)io.Writer
(writes to response body)Body() []byte
(request body)Method() string
URL() don.URL
(request URL)RequestHeader() don.Header
ResponseHeader() don.Header
Query() don.Params
(request URL query)Path() don.Params
(request path params)Status(int) don.Params
(sets status code)Redirect(string, int)
Decode(any) error
(decode request body, path, header & query to struct)Encode(any) error
(encode and write to response body)don.Header
Methods:Get(string) string
Values(string) []string
Add(k,v string)
Set(k,v string)
Range(f func(k,v string))
don.Params
Methods:Get(string) string
Values(string) []string
Range(f func(k,v string))
Use this interface in middleware and handlers that don't use
don.H
. Old style handlers using the fasthttp request directly should also still be supported via an adapter.This will allow
don
to also run on standard libnet/http
down the line by creating a second implementation ofdon.Context
that wraps the standard lib request & response writer.The text was updated successfully, but these errors were encountered: