From 902ad8cb0dd73be872ea3e9e09d97f3608c9dfbf Mon Sep 17 00:00:00 2001 From: Mostafa Rashed <17770919+mrashed-dev@users.noreply.github.com> Date: Thu, 21 Dec 2023 09:41:09 -0500 Subject: [PATCH] Add accept header by default (#442) 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. --- lib/nylas/http_client.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/nylas/http_client.rb b/lib/nylas/http_client.rb index 5f691195..cdc01867 100644 --- a/lib/nylas/http_client.rb +++ b/lib/nylas/http_client.rb @@ -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