Skip to content

Commit

Permalink
Add accept header by default (#442)
Browse files Browse the repository at this point in the history
We set a content-header type by default, but not an accept header. We should add it in to prevent some error messages not being formatted as JSON. Closes #405.
  • Loading branch information
mrashed-dev committed Dec 21, 2023
1 parent ab663a1 commit 902ad8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/nylas/http_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def default_headers
"X-Nylas-Client-Id" => @app_id,
"Nylas-API-Version" => SUPPORTED_API_VERSION,
"User-Agent" => "Nylas Ruby SDK #{Nylas::VERSION} - #{RUBY_VERSION}",
"Content-type" => "application/json"
"Content-type" => "application/json",
"Accept" => "application/json"
}
end

Expand Down

0 comments on commit 902ad8c

Please sign in to comment.