Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
d27c5c8d
Commit
d27c5c8d
authored
Aug 17, 2014
by
smallfish
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some unnecessary code
parent
1f1190fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
httplib.go
httplib/httplib.go
+3
-12
No files found.
httplib/httplib.go
View file @
d27c5c8d
...
...
@@ -395,10 +395,7 @@ func (b *BeegoHttpRequest) ToFile(filename string) error {
}
defer
resp
.
Body
.
Close
()
_
,
err
=
io
.
Copy
(
f
,
resp
.
Body
)
if
err
!=
nil
{
return
err
}
return
nil
return
err
}
// ToJson returns the map that marshals from the body bytes as json in response .
...
...
@@ -409,10 +406,7 @@ func (b *BeegoHttpRequest) ToJson(v interface{}) error {
return
err
}
err
=
json
.
Unmarshal
(
data
,
v
)
if
err
!=
nil
{
return
err
}
return
nil
return
err
}
// ToXml returns the map that marshals from the body bytes as xml in response .
...
...
@@ -423,10 +417,7 @@ func (b *BeegoHttpRequest) ToXML(v interface{}) error {
return
err
}
err
=
xml
.
Unmarshal
(
data
,
v
)
if
err
!=
nil
{
return
err
}
return
nil
return
err
}
// Response executes request client gets response mannually.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment