1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 02:30:56 +00:00

rename SetAgent and ToXML

This commit is contained in:
smallfish 2014-08-18 15:03:10 +08:00
parent d27c5c8daf
commit 86752a55b6

View File

@ -127,7 +127,7 @@ func (b *BeegoHttpRequest) SetEnableCookie(enable bool) *BeegoHttpRequest {
} }
// SetUserAgent sets User-Agent header field // SetUserAgent sets User-Agent header field
func (b *BeegoHttpRequest) SetAgent(useragent string) *BeegoHttpRequest { func (b *BeegoHttpRequest) SetUserAgent(useragent string) *BeegoHttpRequest {
b.setting.UserAgent = useragent b.setting.UserAgent = useragent
return b return b
} }
@ -411,7 +411,7 @@ func (b *BeegoHttpRequest) ToJson(v interface{}) error {
// ToXml returns the map that marshals from the body bytes as xml in response . // ToXml returns the map that marshals from the body bytes as xml in response .
// it calls Response inner. // it calls Response inner.
func (b *BeegoHttpRequest) ToXML(v interface{}) error { func (b *BeegoHttpRequest) ToXml(v interface{}) error {
data, err := b.Bytes() data, err := b.Bytes()
if err != nil { if err != nil {
return err return err