Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONRequest ¶ added in v1.3.9
JSONRequest .
func (*JSONRequest) BeginRequest ¶ added in v1.3.9
func (req *JSONRequest) BeginRequest(rt freedom.Runtime)
BeginRequest .
func (*JSONRequest) ReadBodyJSON ¶ added in v1.3.9
func (req *JSONRequest) ReadBodyJSON(obj interface{}) error
ReadBodyJSON .
func (*JSONRequest) ReadQueryJSON ¶ added in v1.3.9
func (req *JSONRequest) ReadQueryJSON(obj interface{}) error
ReadQueryJSON .
type JSONResponse ¶ added in v1.3.9
type JSONResponse struct {
// Code automatically sets default 501 if the error is not empty
Code int
Err error
// If not nil then it will fire that as "application/json" or the
// "ContentType" if not empty.
Object interface{}
// If Path is not empty then it will redirect
// the client to this Path, if Code is >= 300 and < 400
// then it will use that Code to do the redirection, otherwise
// StatusFound(302) or StatusSeeOther(303) for post methods will be used.
// Except when err != nil.
Path string
// contains filtered or unexported fields
}
func (JSONResponse) Dispatch ¶ added in v1.3.9
func (jrep JSONResponse) Dispatch(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.