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
23457ed2
authored
2015-04-08 20:12:10 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add sethost
1 parent
d7791ba8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
httplib/httplib.go
httplib/httplib.go
View file @
23457ed
...
...
@@ -184,6 +184,12 @@ func (b *BeegoHttpRequest) Header(key, value string) *BeegoHttpRequest {
return
b
}
// Set HOST
func
(
b
*
BeegoHttpRequest
)
SetHost
(
host
string
)
*
BeegoHttpRequest
{
b
.
req
.
Host
=
host
return
b
}
// Set the protocol version for incoming requests.
// Client requests always use HTTP/1.1.
func
(
b
*
BeegoHttpRequest
)
SetProtocolVersion
(
vers
string
)
*
BeegoHttpRequest
{
...
...
@@ -253,7 +259,6 @@ func (b *BeegoHttpRequest) Body(data interface{}) *BeegoHttpRequest {
return
b
}
// JsonBody adds request raw body encoding by JSON.
func
(
b
*
BeegoHttpRequest
)
JsonBody
(
obj
interface
{})
(
*
BeegoHttpRequest
,
error
)
{
if
b
.
req
.
Body
==
nil
&&
obj
!=
nil
{
...
...
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