Shopify/batman — pull request #278 by tdegrunt (2011-12-11 01:25:08+00:00)
Title: Adding in headers, so that storage adapters can easily set custom headers

When trying to write a custom storage adapter, I needed to be able to pass in custom headers to my backend. In this case for security reasons. This seemed like a clean way to solve this, this should also pave the way for issue #276:

@::before 'readAll', 'read', 'create', 'update', 'destroy', @skipIfError (env, next) ->
env.options.headers ?= {}
env.options.headers['Authorization'] = 'Basic yadayadayada'
next()