From 3ceb440accf2370022bd5687f9b372bae1c02637 Mon Sep 17 00:00:00 2001 From: Bastian de Byl Date: Sun, 26 Feb 2023 02:32:20 -0500 Subject: [PATCH] added missing Content-Type to Put and Post --- helper.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helper.go b/helper.go index 3317c75..77da302 100644 --- a/helper.go +++ b/helper.go @@ -17,6 +17,7 @@ func Get(uri string, authName string, authValue string, queries map[string]strin client := &http.Client{} request.Header.Set("Accept", "application/json") + request.Header.Set("Content-Type", "application/json") request.Header.Set("Authorization", fmt.Sprintf("%s %s", authName, authValue)) if len(queries) > 0 { @@ -51,6 +52,7 @@ func Post(uri string, authName string, authValue string, data io.Reader) (*http. client := &http.Client{} + request.Header.Set("Accept", "application/json") request.Header.Set("Content-Type", "application/json") request.Header.Set("Authorization", fmt.Sprintf("%s %s", authName, authValue))