Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
86752a55
authored
2014-08-18 15:03:10 +0800
by
smallfish
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
rename SetAgent and ToXML
1 parent
d27c5c8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
httplib/httplib.go
httplib/httplib.go
View file @
86752a5
...
...
@@ -127,7 +127,7 @@ func (b *BeegoHttpRequest) SetEnableCookie(enable bool) *BeegoHttpRequest {
}
// SetUserAgent sets User-Agent header field
func
(
b
*
BeegoHttpRequest
)
SetAgent
(
useragent
string
)
*
BeegoHttpRequest
{
func
(
b
*
BeegoHttpRequest
)
Set
User
Agent
(
useragent
string
)
*
BeegoHttpRequest
{
b
.
setting
.
UserAgent
=
useragent
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 .
// it calls Response inner.
func
(
b
*
BeegoHttpRequest
)
ToX
ML
(
v
interface
{})
error
{
func
(
b
*
BeegoHttpRequest
)
ToX
ml
(
v
interface
{})
error
{
data
,
err
:=
b
.
Bytes
()
if
err
!=
nil
{
return
err
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment