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
d8f2b05e
authored
2014-08-23 07:02:47 +0800
by
JessonChan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
improve the code and delete NO NEED URL CHECK
1 parent
7b2fe824
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
httplib/httplib.go
httplib/httplib.go
View file @
d8f2b05
...
...
@@ -75,14 +75,14 @@ func SetDefaultSetting(setting BeegoHttpSettings) {
// return *BeegoHttpRequest with specific method
func
newBeegoRequest
(
url
,
method
string
)
*
BeegoHttpRequest
{
var
resp
http
.
Response
req
:=
http
.
Request
{
Method
:
method
,
Header
:
make
(
http
.
Header
),
Proto
:
"HTTP/1.1"
,
ProtoMajor
:
1
,
ProtoMinor
:
1
,
}
var
resp
http
.
Response
req
.
Method
=
method
req
.
Header
=
http
.
Header
{}
return
&
BeegoHttpRequest
{
url
,
&
req
,
map
[
string
]
string
{},
map
[
string
]
string
{},
defaultSetting
,
&
resp
,
nil
}
}
...
...
@@ -310,10 +310,6 @@ func (b *BeegoHttpRequest) getResponse() (*http.Response, error) {
}
url
,
err
:=
url
.
Parse
(
b
.
url
)
if
url
.
Scheme
==
""
{
b
.
url
=
"http://"
+
b
.
url
url
,
err
=
url
.
Parse
(
b
.
url
)
}
if
err
!=
nil
{
return
nil
,
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