Former-commit-id: 64d2bc8657fce2ef4565e0d10dd0f412ee29ffc5
This commit is contained in:
Gerasimos (Makis) Maropoulos 2019-08-03 08:40:48 +03:00
parent b37b369b51
commit 913634384c
4 changed files with 11 additions and 8 deletions

View File

@ -8,7 +8,9 @@ Iris is a fast, simple yet fully featured and very efficient web framework for G
Learn what [others say about Iris](https://iris-go.com/testimonials/) and **star** this github repository.
> Version 11.2 **released!** [Spread the news](https://www.facebook.com/iris.framework/posts/3276606095684693).
> Version 11.2 **released!**
[![https://www.facebook.com/iris.framework/posts/3276606095684693](https://iris-go.com/images/iris-112-released.png)](https://www.facebook.com/iris.framework/posts/3276606095684693)
## Learning Iris

View File

@ -1 +1 @@
11.2.1:https://dev.to/kataras/iris-version-11-2-released-22bc
11.2.3:https://github.com/kataras/iris/releases/tag/v11.2.3

View File

@ -21,6 +21,7 @@ func main() {
Password: "",
Database: "",
Prefix: "",
Delim: "-",
}) // optionally configure the bridge between your redis server.
// close connection when control+C/cmd+C

View File

@ -812,7 +812,7 @@ type Context interface {
// Set mime type priorities by `Negotiation().JSON().XML().HTML()...`.
// Set charset priorities by `Negotiation().Charset(...)`.
// Set encoding algorithm priorities by `Negotiation().Encoding(...)`.
// Amend the accepted by
// Modify the accepted by
// `Negotiation().Accept./Override()/.XML().JSON().Charset(...).Encoding(...)...`.
//
// It returns `ErrContentNotSupported` when not matched mime type(s).
@ -825,7 +825,7 @@ type Context interface {
//
// Supports the above without quality values.
//
// Example at: https://github.com/kataras/iris/blob/master/_examples/http_responsewriter/content-negotiation
// Read more at: https://github.com/kataras/iris/wiki/Content-negotiation
Negotiate(v interface{}) (int, error)
// +------------------------------------------------------------+
@ -3335,8 +3335,8 @@ func (n N) SelectContent(mime string) interface{} {
const negotiationContextKey = "_iris_negotiation_builder"
// Negotiation creates once and returns the negotiation builder
// to build server-side available content for specific mime type(s)
// and charset(s).
// to build server-side available prioritized content
// for specific content type(s), charset(s) and encoding algorithm(s).
//
// See `Negotiate` method too.
func (ctx *context) Negotiation() *NegotiationBuilder {
@ -3385,7 +3385,7 @@ func parseHeader(headerValue string) []string {
// Set mime type priorities by `Negotiation().JSON().XML().HTML()...`.
// Set charset priorities by `Negotiation().Charset(...)`.
// Set encoding algorithm priorities by `Negotiation().Encoding(...)`.
// Amend the accepted by
// Modify the accepted by
// `Negotiation().Accept./Override()/.XML().JSON().Charset(...).Encoding(...)...`.
//
// It returns `ErrContentNotSupported` when not matched mime type(s).
@ -3398,7 +3398,7 @@ func parseHeader(headerValue string) []string {
//
// Supports the above without quality values.
//
// Example at: https://github.com/kataras/iris/blob/master/_examples/http_responsewriter/content-negotiation
// Read more at: https://github.com/kataras/iris/wiki/Content-negotiation
func (ctx *context) Negotiate(v interface{}) (int, error) {
contentType, charset, encoding, content := ctx.Negotiation().Build()
if v == nil {