86752a55 by smallfish

rename SetAgent and ToXML

1 parent d27c5c8d
...@@ -127,7 +127,7 @@ func (b *BeegoHttpRequest) SetEnableCookie(enable bool) *BeegoHttpRequest { ...@@ -127,7 +127,7 @@ func (b *BeegoHttpRequest) SetEnableCookie(enable bool) *BeegoHttpRequest {
127 } 127 }
128 128
129 // SetUserAgent sets User-Agent header field 129 // SetUserAgent sets User-Agent header field
130 func (b *BeegoHttpRequest) SetAgent(useragent string) *BeegoHttpRequest { 130 func (b *BeegoHttpRequest) SetUserAgent(useragent string) *BeegoHttpRequest {
131 b.setting.UserAgent = useragent 131 b.setting.UserAgent = useragent
132 return b 132 return b
133 } 133 }
...@@ -411,7 +411,7 @@ func (b *BeegoHttpRequest) ToJson(v interface{}) error { ...@@ -411,7 +411,7 @@ func (b *BeegoHttpRequest) ToJson(v interface{}) error {
411 411
412 // ToXml returns the map that marshals from the body bytes as xml in response . 412 // ToXml returns the map that marshals from the body bytes as xml in response .
413 // it calls Response inner. 413 // it calls Response inner.
414 func (b *BeegoHttpRequest) ToXML(v interface{}) error { 414 func (b *BeegoHttpRequest) ToXml(v interface{}) error {
415 data, err := b.Bytes() 415 data, err := b.Bytes()
416 if err != nil { 416 if err != nil {
417 return err 417 return err
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!