Documentation ¶
Index ¶
- type FastHttpRouter
- type Request
- func (req *Request) Body(k string) interface{}
- func (req *Request) BodyArray() []interface{}
- func (req *Request) BodyObject() map[string]interface{}
- func (req *Request) Debug(msg string)
- func (req *Request) DebugJSON(i interface{})
- func (req *Request) Device() string
- func (req *Request) Error(msg error)
- func (req *Request) Fail() *http.Status
- func (req *Request) FullPath() string
- func (req *Request) GetRequestHeader(k string) string
- func (req *Request) GetResponseHeader(k string) string
- func (req *Request) HttpError(msg string, code int)
- func (req *Request) IsTLS() bool
- func (req *Request) Log() logging.Logger
- func (req *Request) Method() string
- func (req *Request) NewError(msg string) error
- func (req *Request) R() interface{}
- func (req *Request) RawBody() (*http.Status, []byte)
- func (req *Request) ReadBodyArray() *http.Status
- func (req *Request) ReadBodyObject() *http.Status
- func (req *Request) Redirect(path string, code int) *http.Status
- func (req *Request) Reflect(e interface{})
- func (req *Request) Res() www.ResponseWriter
- func (req *Request) Respond(args ...interface{}) *http.Status
- func (req *Request) ServeFile(path string)
- func (self *Request) SetBodyArray(array []interface{})
- func (self *Request) SetBodyObject(obj map[string]interface{})
- func (req *Request) SetRequestHeader(k, v string)
- func (req *Request) SetResponseHeader(k, v string)
- func (req *Request) Testing() bool
- func (req *Request) Write(b []byte) (int, error)
- func (req *Request) WriteString(s string) (int, error)
- func (req *Request) Writer() io.Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FastHttpRouter ¶
type FastHttpRouter func(ctx *fasthttp.RequestCtx)
type Request ¶
type Request struct { *parameters.Parameters Node *tree.Node sync.RWMutex // contains filtered or unexported fields }
func NewRequestObject ¶
func NewRequestObject(node *tree.Node, ctx *fasthttp.RequestCtx) *Request
NewRequestObject constructs a new Request implementation for the fasthttp latform.
func (*Request) BodyArray ¶
func (req *Request) BodyArray() []interface{}
BodyArray returns the HTTP body which was previously unmarshaled into a slice.
func (*Request) BodyObject ¶
BodyObject returns the HTTP body which was previously unmarshaled into a map.
func (*Request) GetRequestHeader ¶
GetRequestHeader sets a request header value.
func (*Request) GetResponseHeader ¶
GetResponseHeader gets a header value from the response.
func (*Request) ReadBodyArray ¶
ReadBodyArray unmarshals the body into a slice of interface{}.
func (*Request) ReadBodyObject ¶
ReadBodyObject unmarshals the body into a map of interface{}.
func (*Request) Res ¶
func (req *Request) Res() www.ResponseWriter
Does nothing useful in httprouter
func (*Request) SetBodyObject ¶
SetBodyObject
func (*Request) SetRequestHeader ¶
SetRequestHeader sets a request header value.
func (*Request) SetResponseHeader ¶
SetResponseHeader sets a response header value.
func (*Request) WriteString ¶
WriteString calls the write method on the 'core/http' responsewriter after transforming the input to a byte slice.