mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
add more text under the compability with net/http
parent
640542fa10
commit
2fd6d81ddd
|
@ -118,7 +118,11 @@ app.SetExecutionRules(iris.ExecutionRules{
|
|||
|
||||
## Convert `http.Handler/HandlerFunc`
|
||||
|
||||
Any third-party middleware that written for `net/http` is automatic compatible with Iris using the `iris.FromStd(aThirdPartyMiddleware)`. Remember, `ctx.ResponseWriter()` and `ctx.Request()` returns the same `net/http` input arguments for an `http.Handler`.
|
||||
However you are not limited to them - you are free to use any third-party middleware that is compatible with the [net/http](https://golang.org/pkg/net/http/) package.
|
||||
|
||||
Iris, unlike others, is 100% compatible with the standards and that's why the majority of big companies that adapt Go to their workflow, like a very famous US Television Network, trust Iris; it's up-to-date and it will be always aligned with the std `net/http` package which is modernized by the Go Authors on each new release of the Go Programming Language.
|
||||
|
||||
Any third-party middleware that written for `net/http` is compatible with Iris using the `iris.FromStd(aThirdPartyMiddleware)`. Remember, `ctx.ResponseWriter()` and `ctx.Request()` returns the same `net/http` input arguments of an [http.Handler](https://golang.org/pkg/net/http/#Handler).
|
||||
|
||||
- [From func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)](convert-handlers/negroni-like/main.go)
|
||||
- [From http.Handler or http.HandlerFunc](convert-handlers/nethttp/main.go)
|
||||
|
|
Loading…
Reference in New Issue
Block a user