Skip to content

Commit

Permalink
add accept and content-type headers for newer freenas versions
Browse files Browse the repository at this point in the history
  • Loading branch information
travisghansen committed Jan 20, 2020
1 parent 2262ecb commit 00a6bc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion freenas/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ func (s *Server) getSlingConnection() *sling.Sling {
}

httpClient := &http.Client{Transport: tr}
return sling.New().Client(httpClient).Base(s.url).SetBasicAuth(s.Username, s.Password)
return sling.New().Client(httpClient).Base(s.url).SetBasicAuth(s.Username, s.Password).Set("Accept", "application/json").Set("Content-Type", "application/json")
}

0 comments on commit 00a6bc1

Please sign in to comment.