Skip to content
Snippets Groups Projects
Commit 3a038049 authored by Luca Moser's avatar Luca Moser Committed by Wolfgang Welz
Browse files

Fix: Add content-type header in client lib http reqs (#176)

parent 6a408ad7
No related branches found
No related tags found
No related merge requests found
......@@ -114,6 +114,10 @@ func (api *GoShimmerAPI) do(method string, route string, reqObj interface{}, res
return err
}
if data != nil {
req.Header.Set("Content-Type", contentTypeJSON)
}
// add authorization header with JWT
if len(api.jwt) > 0 {
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", api.jwt))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment