else
query["_method"] = "GET"
end
+
+ # Use anonymous token for GET requests when no api_token is available
+ if ((query["_method"] == "GET") or (query[:_method] == "GET")) && query["api_token"].empty?
+ query['api_token'] = Rails.configuration.anonymous_user_token
+ end
+
if @@profiling_enabled
query["_profile"] = "true"
end
rescue Oj::ParseError
resp = nil
end
+
if not resp.is_a? Hash
raise InvalidApiResponseException.new(url, msg)
elsif msg.status_code != 200