chore: update main.go
This commit is contained in:
3
main.go
3
main.go
@@ -72,7 +72,10 @@ func request(client *http.Client, method, url string, body interface{}) (*http.R
|
|||||||
}
|
}
|
||||||
|
|
||||||
req.Header.Set("X-API-KEY", portainerToken)
|
req.Header.Set("X-API-KEY", portainerToken)
|
||||||
|
if method != "GET" {
|
||||||
req.Header.Set("Content-Type", "application/json")
|
req.Header.Set("Content-Type", "application/json")
|
||||||
|
}
|
||||||
|
|
||||||
return client.Do(req)
|
return client.Do(req)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user