mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
new 'Party.DI()' method to return the Party's instance of the new 'APIBuilderDI' and move the DI-relative Router to this new APIBuilderDI
Former-commit-id: 2fb81406c6e3162991c90e0918a3cac1b77c2b54
This commit is contained in:
@@ -4039,7 +4039,7 @@ func (n *NegotiationBuilder) JSON(v ...interface{}) *NegotiationBuilder {
|
||||
return n.MIME(ContentJSONHeaderValue, content)
|
||||
}
|
||||
|
||||
// Problem registers the "application/problem+xml" or "application/problem+xml" content type and, optionally,
|
||||
// Problem registers the "application/problem+json" or "application/problem+xml" content type and, optionally,
|
||||
// a value that `Context.Negotiate` will render
|
||||
// when a client accepts the "application/problem+json" or the "application/problem+xml" content type.
|
||||
//
|
||||
@@ -4251,7 +4251,7 @@ func negotiationMatch(in []string, priorities []string) string {
|
||||
type NegotiationAcceptBuilder struct {
|
||||
// initialized with "Accept" request header values.
|
||||
accept []string
|
||||
// initialized with "Accept-Encoding" request header. and if was empty then the
|
||||
// initialized with "Accept-Charset" request header. and if was empty then the
|
||||
// application's default (which defaults to utf-8).
|
||||
charset []string
|
||||
// initialized with "Accept-Encoding" request header values.
|
||||
@@ -4356,6 +4356,18 @@ func (n *NegotiationAcceptBuilder) YAML() *NegotiationAcceptBuilder {
|
||||
return n.MIME(ContentYAMLHeaderValue)
|
||||
}
|
||||
|
||||
// Protobuf adds the "application/x-protobuf" as accepted client content type.
|
||||
// Returns itself.
|
||||
func (n *NegotiationAcceptBuilder) Protobuf() *NegotiationAcceptBuilder {
|
||||
return n.MIME(ContentYAMLHeaderValue)
|
||||
}
|
||||
|
||||
// MsgPack adds the "application/msgpack" and "application/x-msgpack" as accepted client content types.
|
||||
// Returns itself.
|
||||
func (n *NegotiationAcceptBuilder) MsgPack() *NegotiationAcceptBuilder {
|
||||
return n.MIME(ContentYAMLHeaderValue)
|
||||
}
|
||||
|
||||
// Charset adds one or more client accepted charsets.
|
||||
// Returns itself.
|
||||
func (n *NegotiationAcceptBuilder) Charset(charset ...string) *NegotiationAcceptBuilder {
|
||||
|
||||
Reference in New Issue
Block a user