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
8b8638c5
authored
2014-08-17 21:36:10 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge pull request #748 from smallfish/master
Remove some unnecessary code
2 parents
86121dea
d27c5c8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
httplib/httplib.go
httplib/httplib.go
View file @
8b8638c
...
...
@@ -394,10 +394,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 .
...
...
@@ -408,10 +405,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 .
...
...
@@ -422,10 +416,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
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