Skip to content

Commit 5dda11a

Browse files
committed
Added authorization bearer prefix for token
Inspired by c4998e2 by brunomperes on GitHub
1 parent 8f75b9b commit 5dda11a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/api/sendpulse_api.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def send_request(path, method = 'GET', data = {}, use_token = true)
114114
http.use_ssl = true if @protocol == 'https'
115115

116116
token = {}
117-
token.merge!( 'authorization' => @token ) if use_token
117+
token.merge!( 'Authorization' => "Bearer #{@token}" ) if use_token
118118

119119
case method
120120
when 'POST'
@@ -637,4 +637,4 @@ def smtp_send_mail(email)
637637
send_request('smtp/emails', 'POST', data)
638638
end
639639

640-
end
640+
end

0 commit comments

Comments
 (0)