1
0
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:
Gerasimos (Makis) Maropoulos
2020-02-16 11:14:35 +02:00
parent 899aec8b19
commit 08403f0317
21 changed files with 275 additions and 240 deletions

View File

@@ -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

View File

@@ -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)