Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
koko
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
koko
Commits
4fdac63b
Commit
4fdac63b
authored
Apr 24, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 暂时解决冲突
parent
c66ef25b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
41 deletions
+0
-41
client.go
pkg/sdk/client.go
+0
-41
No files found.
pkg/sdk/client.go
View file @
4fdac63b
...
...
@@ -43,24 +43,14 @@ func (c *WrapperClient) CheckAuth() error {
}
func
(
c
*
WrapperClient
)
Get
(
url
string
,
res
interface
{},
needAuth
bool
)
error
{
<<<<<<<
HEAD
//if needAuth {
// c.Http.SetAuth(c.Auth.Sign())
//} else {
// c.Http.SetAuth("")
//}
=======
if
needAuth
{
return
c
.
AuthClient
.
Get
(
c
.
BaseHost
+
url
,
res
)
}
else
{
return
c
.
Http
.
Get
(
c
.
BaseHost
+
url
,
res
)
}
>>>>>>>
228056688660034
ec5b8061e99c187aa0b1c85e7
}
func
(
c
*
WrapperClient
)
Post
(
url
string
,
data
interface
{},
res
interface
{},
needAuth
bool
)
error
{
<<<<<<<
HEAD
//if needAuth {
// c.Http.SetAuth(c.Auth.Sign())
//} else {
...
...
@@ -94,35 +84,4 @@ func (c *WrapperClient) Patch(url string, data interface{}, res interface{}, nee
// c.Http.SetAuth("")
//}
return
c
.
Http
.
Patch
(
url
,
data
,
res
)
=======
if
needAuth
{
return
c
.
AuthClient
.
Post
(
url
,
data
,
res
)
}
else
{
return
c
.
Http
.
Post
(
url
,
data
,
res
)
}
}
func
(
c
*
WrapperClient
)
Delete
(
url
string
,
res
interface
{},
needAuth
bool
)
error
{
if
needAuth
{
return
c
.
AuthClient
.
Delete
(
url
,
res
)
}
else
{
return
c
.
Http
.
Delete
(
url
,
res
)
}
}
func
(
c
*
WrapperClient
)
Put
(
url
string
,
data
interface
{},
res
interface
{},
needAuth
bool
)
error
{
if
needAuth
{
return
c
.
AuthClient
.
Put
(
url
,
data
,
res
)
}
else
{
return
c
.
Http
.
Put
(
url
,
data
,
res
)
}
}
func
(
c
*
WrapperClient
)
Patch
(
url
string
,
data
interface
{},
res
interface
{},
needAuth
bool
)
error
{
if
needAuth
{
return
c
.
AuthClient
.
Patch
(
url
,
data
,
res
)
}
else
{
return
c
.
Http
.
Patch
(
url
,
data
,
res
)
}
>>>>>>>
228056688660034
ec5b8061e99c187aa0b1c85e7
}
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