Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
965535a403 | ||
|
|
913a8d1d9c | ||
|
|
8cec06641b |
@@ -16,7 +16,6 @@ func Get(uri string, authName string, authValue string, queries map[string]strin
|
|||||||
client := &http.Client{}
|
client := &http.Client{}
|
||||||
|
|
||||||
request.Header.Set("Accept", "application/json")
|
request.Header.Set("Accept", "application/json")
|
||||||
request.Header.Set("Content-Type", "application/json")
|
|
||||||
request.Header.Set("Authorization", fmt.Sprintf("%s %s", authName, authValue))
|
request.Header.Set("Authorization", fmt.Sprintf("%s %s", authName, authValue))
|
||||||
|
|
||||||
if len(queries) > 0 {
|
if len(queries) > 0 {
|
||||||
@@ -78,6 +77,7 @@ func Put(uri string, authName string, authValue string, data any) (*http.Respons
|
|||||||
client := &http.Client{}
|
client := &http.Client{}
|
||||||
|
|
||||||
request.Header.Set("Content-Type", "application/json")
|
request.Header.Set("Content-Type", "application/json")
|
||||||
|
request.Header.Set("Accept", "application/json")
|
||||||
request.Header.Set("Authorization", fmt.Sprintf("%s %s", authName, authValue))
|
request.Header.Set("Authorization", fmt.Sprintf("%s %s", authName, authValue))
|
||||||
|
|
||||||
response, err := client.Do(request)
|
response, err := client.Do(request)
|
||||||
Reference in New Issue
Block a user