We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
with 1.10.0 support for application/yaml was introduced (#3851)
application/yaml
The Negotiate func of context (https://github.com/gin-gonic/gin/blob/master/context.go#L1179) does not support this content type yet.
package main import ( "github.com/gin-gonic/gin" ) func main() { g := gin.Default() g.GET("/hello/:name", func(c *gin.Context) { c.Negotiate(http.StatusInternalServerError, gin.Negotiate{ Offered: []string{binding.MIMEJSON, binding.MIMEYAML2}, Data: gin.H{"error": err.Error()}, }) }) g.Run(":9000") }
$ curl -H "Content-Type: application/yaml" http://localhost:9000/hello/world # should return status code 500
$ curl -H "Content-Type: application/yaml" http://localhost:9000/hello/world # status code 406
The text was updated successfully, but these errors were encountered:
Hello, I submitted support for application/yaml judgment logic in Negotiate
Sorry, something went wrong.
@bakito Try the latest version.
@appleboy I can conform, that my use case is working again when running against the master branch. @RedCrazyGhost Thank you very much
No branches or pull requests
Description
with 1.10.0 support for
application/yaml
was introduced (#3851)The Negotiate func of context (https://github.com/gin-gonic/gin/blob/master/context.go#L1179) does not support this content type yet.
How to reproduce
Expectations
Actual result
Environment
The text was updated successfully, but these errors were encountered: