lib/tasks/graphiti.rake in graphiti-rails-0.3.0 vs lib/tasks/graphiti.rake in graphiti-rails-0.4.0
- old
+ new
@@ -20,10 +20,13 @@
else
"?cache=bust"
end
path = "#{path}&debug=true" if debug
handle_request_exceptions do
- session.get(path.to_s)
+ headers = {
+ "Authorization": ENV['AUTHORIZATION_HEADER']
+ }.compact
+ session.get(path.to_s, headers: headers)
end
JSON.parse(session.response.body)
end
desc "Execute request without web server."