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
d27c5c8d
authored
2014-08-17 21:13:29 +0800
by
smallfish
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Remove some unnecessary code
1 parent
1f1190fb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
9 deletions
httplib/httplib.go
httplib/httplib.go
View file @
d27c5c8
...
...
@@ -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
}
// 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
}
// 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
}
// 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