mirror of
https://github.com/kataras/iris.git
synced 2025-12-22 04:17:03 +00:00
Update to version 12.1.8 - Read HISTORY.md
Former-commit-id: d3d30cb15537146e3071731be9d674a5cb59de97
This commit is contained in:
@@ -31,11 +31,19 @@ func newApp() *iris.Application {
|
||||
return ctx.Request().Context()
|
||||
}).
|
||||
// Bind loginRequest.
|
||||
Register(func(ctx iris.Context) loginRequest {
|
||||
var req loginRequest
|
||||
ctx.ReadJSON(&req)
|
||||
return req
|
||||
}).
|
||||
// Register(func(ctx iris.Context) loginRequest {
|
||||
// var req loginRequest
|
||||
// ctx.ReadJSON(&req)
|
||||
// return req
|
||||
// }).
|
||||
// OR
|
||||
// Bind any other structure or pointer to a structure from request's
|
||||
// XML
|
||||
// YAML
|
||||
// Query
|
||||
// Form
|
||||
// JSON (default, if not client's "Content-Type" specified otherwise)
|
||||
Register(mvc.AutoBinding).
|
||||
Handle(&myController{})
|
||||
|
||||
return app
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/kataras/iris/v12/httptest"
|
||||
)
|
||||
|
||||
func TestBindContextContext(t *testing.T) {
|
||||
func TestGRPCCompatible(t *testing.T) {
|
||||
app := newApp()
|
||||
|
||||
e := httptest.New(t, app)
|
||||
|
||||
Reference in New Issue
Block a user