mirror of
https://github.com/simon987/task_tracker.git
synced 2025-04-10 14:06:43 +00:00
Remove http prefix in client
This commit is contained in:
parent
68cc3b7c81
commit
ed8b153d3b
@ -36,7 +36,7 @@ func (c *taskTrackerClient) SetWorker(worker *Worker) {
|
||||
|
||||
func (c *taskTrackerClient) get(path string) *http.Response {
|
||||
|
||||
url := "http://" + c.serverAddress + path
|
||||
url := c.serverAddress + path
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
|
||||
if c.worker != nil {
|
||||
@ -55,7 +55,7 @@ func (c *taskTrackerClient) post(path string, x interface{}) *http.Response {
|
||||
body, err := json.Marshal(x)
|
||||
buf := bytes.NewBuffer(body)
|
||||
|
||||
req, err := http.NewRequest("POST", "http://"+c.serverAddress+path, buf)
|
||||
req, err := http.NewRequest("POST", c.serverAddress+path, buf)
|
||||
handleErr(err)
|
||||
|
||||
if c.worker != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user