1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-26 18:54:13 +00:00

Merge branch 'develop' into develop

This commit is contained in:
astaxie 2018-06-23 22:43:45 +08:00 committed by GitHub
commit 6b3b8607a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

2
app.go
View File

@ -24,8 +24,8 @@ import (
"net/http/fcgi"
"os"
"path"
"time"
"strings"
"time"
"github.com/astaxie/beego/grace"
"github.com/astaxie/beego/logs"

View File

@ -317,6 +317,7 @@ func (b *BeegoHTTPRequest) Body(data interface{}) *BeegoHTTPRequest {
}
return b
}
// XMLBody adds request raw body encoding by XML.
func (b *BeegoHTTPRequest) XMLBody(obj interface{}) (*BeegoHTTPRequest, error) {
if b.req.Body == nil && obj != nil {
@ -330,6 +331,7 @@ func (b *BeegoHTTPRequest) XMLBody(obj interface{}) (*BeegoHTTPRequest, error) {
}
return b, nil
}
// JSONBody adds request raw body encoding by JSON.
func (b *BeegoHTTPRequest) JSONBody(obj interface{}) (*BeegoHTTPRequest, error) {
if b.req.Body == nil && obj != nil {