From c4998e2d72136ca03133f9e52f5e9c7365436df3 Mon Sep 17 00:00:00 2001 From: Bruno Peres Date: Thu, 30 Mar 2017 20:28:11 -0300 Subject: [PATCH] Added Bearer to Authorization header --- api/sendpulse_api.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/sendpulse_api.rb b/api/sendpulse_api.rb index f1405aa..c9abd48 100644 --- a/api/sendpulse_api.rb +++ b/api/sendpulse_api.rb @@ -114,7 +114,7 @@ def send_request(path, method = 'GET', data = {}, use_token = true) http.use_ssl = true if @protocol == 'https' token = {} - token.merge!( 'authorization' => @token ) if use_token + token.merge!( 'Authorization' => "Bearer #{@token}" ) if use_token case method when 'POST' @@ -637,4 +637,4 @@ def smtp_send_mail(email) send_request('smtp/emails', 'POST', data) end -end \ No newline at end of file +end