kounta_rest 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kounta/rest/client.rb +1 -7
- data/lib/kounta/version.rb +1 -1
- metadata +1 -1
data/lib/kounta/rest/client.rb
CHANGED
@@ -29,13 +29,8 @@ module Kounta
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def perform(url_hash, request_method, options={})
|
32
|
-
options[:headers] ||= {}
|
33
|
-
options[:headers].merge!(Kounta::REQUEST_HEADERS)
|
34
|
-
|
35
32
|
begin
|
36
|
-
response = @conn.request(request_method, "#{path_from_hash(url_hash)}.#{FORMAT.to_s}", options)
|
37
|
-
|
38
|
-
end
|
33
|
+
response = @conn.request(request_method, "#{path_from_hash(url_hash)}.#{FORMAT.to_s}", options)
|
39
34
|
rescue OAuth2::Error => ex
|
40
35
|
if ex.message.include? 'The access token provided has expired'
|
41
36
|
@conn = refreshed_token
|
@@ -43,7 +38,6 @@ module Kounta
|
|
43
38
|
end
|
44
39
|
raise Kounta::Errors::APIError.new(ex.message)
|
45
40
|
end
|
46
|
-
|
47
41
|
response
|
48
42
|
end
|
49
43
|
|
data/lib/kounta/version.rb
CHANGED