From 4527972cd895af6932ac13ecb6d51c78dc82674d Mon Sep 17 00:00:00 2001 From: benji Date: Wed, 18 Jan 2017 21:56:45 +0100 Subject: [PATCH] Fix json request bug --- app/jobs/tab_api_job.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/jobs/tab_api_job.rb b/app/jobs/tab_api_job.rb index 263547c..e0b6286 100644 --- a/app/jobs/tab_api_job.rb +++ b/app/jobs/tab_api_job.rb @@ -11,7 +11,8 @@ TabApiJob = Struct.new(:order_id) do } } headers = { - "Authorization" => "Token token=#{Rails.application.secrets.tab_api_key}" + "Authorization" => "Token token=#{Rails.application.secrets.tab_api_key}", + 'Accept' => 'application/json' } result = HTTParty.post(File.join(Rails.application.config.api_url, "transactions"), body: body, headers: headers )