Skip to content

Commit

Permalink
Set Accept header
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Jan 30, 2024
1 parent 358db9c commit 8e3cc6d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hubutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func PredictJSONInput(uri string, rec Record, r *http.Request) ([]byte, string,
return data, mtype, err
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Accept", "application/json")
rsp, err := client.Do(req)
if rsp.StatusCode != http.StatusOK {
msg := fmt.Sprintf("request to %s failed with response code: %d", rec.Backend, rsp.StatusCode)
Expand Down

0 comments on commit 8e3cc6d

Please sign in to comment.