Commit 4fdac63b authored by ibuler's avatar ibuler

[Update] 暂时解决冲突

parent c66ef25b
...@@ -43,24 +43,14 @@ func (c *WrapperClient) CheckAuth() error { ...@@ -43,24 +43,14 @@ func (c *WrapperClient) CheckAuth() error {
} }
func (c *WrapperClient) Get(url string, res interface{}, needAuth bool) 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 { if needAuth {
return c.AuthClient.Get(c.BaseHost+url, res) return c.AuthClient.Get(c.BaseHost+url, res)
} else { } else {
return c.Http.Get(c.BaseHost+url, res) return c.Http.Get(c.BaseHost+url, res)
} }
>>>>>>> 228056688660034ec5b8061e99c187aa0b1c85e7
} }
func (c *WrapperClient) Post(url string, data interface{}, res interface{}, needAuth bool) error { func (c *WrapperClient) Post(url string, data interface{}, res interface{}, needAuth bool) error {
<<<<<<< HEAD
//if needAuth { //if needAuth {
// c.Http.SetAuth(c.Auth.Sign()) // c.Http.SetAuth(c.Auth.Sign())
//} else { //} else {
...@@ -94,35 +84,4 @@ func (c *WrapperClient) Patch(url string, data interface{}, res interface{}, nee ...@@ -94,35 +84,4 @@ func (c *WrapperClient) Patch(url string, data interface{}, res interface{}, nee
// c.Http.SetAuth("") // c.Http.SetAuth("")
//} //}
return c.Http.Patch(url, data, res) 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)
}
>>>>>>> 228056688660034ec5b8061e99c187aa0b1c85e7
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment