1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00

add read-body example

Former-commit-id: 7d7afa555e66fbe7edfa31203c26b4b550f336f4
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-04-11 00:55:31 +03:00
parent 978718454a
commit e9b10b14a3
4 changed files with 111 additions and 2 deletions

View File

@@ -3621,7 +3621,7 @@ func WriteXML(writer io.Writer, v interface{}, options XML, optimize bool) (int,
}
if !optimize && options.Indent == "" {
options.Indent = " "
options.Indent = " " // Two spaces for XML is the default indentation when not optimized.
}
if indent := options.Indent; indent != "" {
@@ -3941,7 +3941,7 @@ func (ctx *context) Negotiate(v interface{}) (int, error) {
if contentType == "" {
// If the server cannot serve any matching set,
// it can send back a 406 (Not Acceptable) error code.
// it SHOULD send back a 406 (Not Acceptable) error code.
ctx.StatusCode(http.StatusNotAcceptable)
return -1, ErrContentNotSupported
}