Skip to content

Commit 00a6bc1

Browse files
committed
add accept and content-type headers for newer freenas versions
1 parent 2262ecb commit 00a6bc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

freenas/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ func (s *Server) getSlingConnection() *sling.Sling {
5454
}
5555

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

0 commit comments

Comments
 (0)