mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
minor
Former-commit-id: 64d2bc8657fce2ef4565e0d10dd0f412ee29ffc5
This commit is contained in:
parent
b37b369b51
commit
913634384c
|
@ -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.
|
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
|
## Learning Iris
|
||||||
|
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -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
|
|
@ -21,6 +21,7 @@ func main() {
|
||||||
Password: "",
|
Password: "",
|
||||||
Database: "",
|
Database: "",
|
||||||
Prefix: "",
|
Prefix: "",
|
||||||
|
Delim: "-",
|
||||||
}) // optionally configure the bridge between your redis server.
|
}) // optionally configure the bridge between your redis server.
|
||||||
|
|
||||||
// close connection when control+C/cmd+C
|
// close connection when control+C/cmd+C
|
||||||
|
|
|
@ -812,7 +812,7 @@ type Context interface {
|
||||||
// Set mime type priorities by `Negotiation().JSON().XML().HTML()...`.
|
// Set mime type priorities by `Negotiation().JSON().XML().HTML()...`.
|
||||||
// Set charset priorities by `Negotiation().Charset(...)`.
|
// Set charset priorities by `Negotiation().Charset(...)`.
|
||||||
// Set encoding algorithm priorities by `Negotiation().Encoding(...)`.
|
// Set encoding algorithm priorities by `Negotiation().Encoding(...)`.
|
||||||
// Amend the accepted by
|
// Modify the accepted by
|
||||||
// `Negotiation().Accept./Override()/.XML().JSON().Charset(...).Encoding(...)...`.
|
// `Negotiation().Accept./Override()/.XML().JSON().Charset(...).Encoding(...)...`.
|
||||||
//
|
//
|
||||||
// It returns `ErrContentNotSupported` when not matched mime type(s).
|
// It returns `ErrContentNotSupported` when not matched mime type(s).
|
||||||
|
@ -825,7 +825,7 @@ type Context interface {
|
||||||
//
|
//
|
||||||
// Supports the above without quality values.
|
// 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)
|
Negotiate(v interface{}) (int, error)
|
||||||
|
|
||||||
// +------------------------------------------------------------+
|
// +------------------------------------------------------------+
|
||||||
|
@ -3335,8 +3335,8 @@ func (n N) SelectContent(mime string) interface{} {
|
||||||
const negotiationContextKey = "_iris_negotiation_builder"
|
const negotiationContextKey = "_iris_negotiation_builder"
|
||||||
|
|
||||||
// Negotiation creates once and returns the negotiation builder
|
// Negotiation creates once and returns the negotiation builder
|
||||||
// to build server-side available content for specific mime type(s)
|
// to build server-side available prioritized content
|
||||||
// and charset(s).
|
// for specific content type(s), charset(s) and encoding algorithm(s).
|
||||||
//
|
//
|
||||||
// See `Negotiate` method too.
|
// See `Negotiate` method too.
|
||||||
func (ctx *context) Negotiation() *NegotiationBuilder {
|
func (ctx *context) Negotiation() *NegotiationBuilder {
|
||||||
|
@ -3385,7 +3385,7 @@ func parseHeader(headerValue string) []string {
|
||||||
// Set mime type priorities by `Negotiation().JSON().XML().HTML()...`.
|
// Set mime type priorities by `Negotiation().JSON().XML().HTML()...`.
|
||||||
// Set charset priorities by `Negotiation().Charset(...)`.
|
// Set charset priorities by `Negotiation().Charset(...)`.
|
||||||
// Set encoding algorithm priorities by `Negotiation().Encoding(...)`.
|
// Set encoding algorithm priorities by `Negotiation().Encoding(...)`.
|
||||||
// Amend the accepted by
|
// Modify the accepted by
|
||||||
// `Negotiation().Accept./Override()/.XML().JSON().Charset(...).Encoding(...)...`.
|
// `Negotiation().Accept./Override()/.XML().JSON().Charset(...).Encoding(...)...`.
|
||||||
//
|
//
|
||||||
// It returns `ErrContentNotSupported` when not matched mime type(s).
|
// It returns `ErrContentNotSupported` when not matched mime type(s).
|
||||||
|
@ -3398,7 +3398,7 @@ func parseHeader(headerValue string) []string {
|
||||||
//
|
//
|
||||||
// Supports the above without quality values.
|
// 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) {
|
func (ctx *context) Negotiate(v interface{}) (int, error) {
|
||||||
contentType, charset, encoding, content := ctx.Negotiation().Build()
|
contentType, charset, encoding, content := ctx.Negotiation().Build()
|
||||||
if v == nil {
|
if v == nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user