Skip to content

Instantly share code, notes, and snippets.

@adam-phillipps
Created March 9, 2016 22:41
Show Gist options
  • Save adam-phillipps/ec47ae4b79d3ca1ee9f4 to your computer and use it in GitHub Desktop.
Save adam-phillipps/ec47ae4b79d3ca1ee9f4 to your computer and use it in GitHub Desktop.
# resource_uri = "http://gallery.dev:4000/api/v1/courses/717"
# cleanup_response = RestClient.delete(resource_uri, auth)
# cleanup_response = RestClient.delete(resource_uri, header: auth)
# cleanup_response = RestClient.delete(resource_uri, { 'Authorization' => auth })
# cleanup_response = RestClient.delete(resource_uri, header: { 'Authorization' => auth2 })
# lots of other combos
def auth2
{ 'Authorization' => "Bearer #{ENV['CANVAS_API_TOKEN']}" }
end
def auth
'Authorization: Token token="' + ENV['GALLERY_API_TOKEN'] + '"'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment