lib/rodauth/oauth/http_extensions.rb in rodauth-oauth-1.3.2 vs lib/rodauth/oauth/http_extensions.rb in rodauth-oauth-1.4.0
- old
+ new
@@ -30,10 +30,10 @@
request["accept"] = json_response_content_type
yield request if block_given?
response = http.request(request)
- authorization_required unless response.code.to_i == 200
+ authorization_required unless (200..299).include?(response.code.to_i)
response
end
def http_request_with_cache(uri, *args)
uri = URI(uri)