mirror of
https://github.com/kataras/iris.git
synced 2026-01-07 12:07:28 +00:00
add examples for read using custom decoder per type, read using custom decoder via iris#UnmarshalerFunc and to complete it add an example for the context#ReadXML.
Former-commit-id: 536b1780f12d0b9d9ce9aa976a0f95f18634ec2d
This commit is contained in:
10
go19.go
10
go19.go
@@ -17,6 +17,16 @@ type (
|
||||
// Developers send responses to the client's request through a Context.
|
||||
// Developers get request information from the client's request by a Context.
|
||||
Context = context.Context
|
||||
// UnmarshalerFunc a shortcut, an alias for the `context#UnmarshalerFunc` type
|
||||
// which implements the `context#Unmarshaler` interface for reading request's body
|
||||
// via custom decoders, most of them already implement the `context#UnmarshalerFunc`
|
||||
// like the json.Unmarshal, xml.Unmarshal, yaml.Unmarshal and every library which
|
||||
// follows the best practises and is aligned with the Go standards.
|
||||
//
|
||||
// See 'context#UnmarshalBody` for more.
|
||||
//
|
||||
// Example: https://github.com/kataras/iris/blob/master/_examples/http_request/read-custom-via-unmarshaler/main.go
|
||||
UnmarshalerFunc = context.UnmarshalerFunc
|
||||
// A Handler responds to an HTTP request.
|
||||
// It writes reply headers and data to the Context.ResponseWriter() and then return.
|
||||
// Returning signals that the request is finished;
|
||||
|
||||
Reference in New Issue
Block a user