{"pull_request":{"merged_at":"2011-12-17T18:33:55Z","user":{"id":46554,"login":"tdegrunt","url":"https://api.github.com/users/tdegrunt","avatar_url":"https://secure.gravatar.com/avatar/4fbadf51bbaa420ab4ebc0e516db1125?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4fbadf51bbaa420ab4ebc0e516db1125"},"created_at":"2011-12-11T01:25:08Z","title":"Adding in headers, so that storage adapters can easily set custom headers","updated_at":"2011-12-17T18:33:55Z","review_comments":0,"state":"closed","id":581002,"patch_url":"https://github.com/Shopify/batman/pull/278.patch","html_url":"https://github.com/Shopify/batman/pull/278","closed_at":"2011-12-17T18:33:55Z","deletions":2,"mergeable":null,"issue_url":"https://github.com/Shopify/batman/issues/278","base":{"user":{"id":8085,"login":"Shopify","url":"https://api.github.com/users/Shopify","avatar_url":"https://secure.gravatar.com/avatar/c5c29e455b8c4f05112abbc01af58a29?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"c5c29e455b8c4f05112abbc01af58a29"},"ref":"master","sha":"0c2ea5f1eb578bbed15b45528a1d2756a1149cde","repo":{"open_issues":32,"created_at":"2011-01-22T18:27:42Z","watchers":684,"git_url":"git://github.com/Shopify/batman.git","updated_at":"2011-12-17T18:33:56Z","fork":false,"id":1282541,"language":"CoffeeScript","html_url":"https://github.com/Shopify/batman","name":"batman","description":"Fighting Crime and Kicking Apps","master_branch":null,"forks":52,"url":"https://api.github.com/repos/Shopify/batman","ssh_url":"git@github.com:Shopify/batman.git","clone_url":"https://github.com/Shopify/batman.git","pushed_at":"2011-12-17T18:33:56Z","owner":{"id":8085,"login":"Shopify","url":"https://api.github.com/users/Shopify","avatar_url":"https://secure.gravatar.com/avatar/c5c29e455b8c4f05112abbc01af58a29?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"c5c29e455b8c4f05112abbc01af58a29"},"homepage":"batmanjs.org","size":1632,"svn_url":"https://svn.github.com/Shopify/batman","private":false},"label":"Shopify:master"},"body":"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:\r\n\r\n    @::before 'readAll', 'read', 'create', 'update', 'destroy', @skipIfError (env, next) ->\r\n      env.options.headers ?= {}\r\n      env.options.headers['Authorization'] = 'Basic yadayadayada'\r\n      next()\r\n","commits":1,"number":278,"additions":14,"url":"https://api.github.com/repos/Shopify/batman/pulls/278","diff_url":"https://github.com/Shopify/batman/pull/278.diff","merged_by":{"id":158950,"login":"hornairs","url":"https://api.github.com/users/hornairs","avatar_url":"https://secure.gravatar.com/avatar/a4f464714080f787b71aa3b4eaeef43f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a4f464714080f787b71aa3b4eaeef43f"},"_links":{"review_comments":{"href":"https://api.github.com/repos/Shopify/batman/pulls/278/comments"},"html":{"href":"https://github.com/Shopify/batman/pull/278"},"self":{"href":"https://api.github.com/repos/Shopify/batman/pulls/278"},"comments":{"href":"https://api.github.com/repos/Shopify/batman/issues/278/comments"}},"comments":0,"head":{"user":{"id":46554,"login":"tdegrunt","url":"https://api.github.com/users/tdegrunt","avatar_url":"https://secure.gravatar.com/avatar/4fbadf51bbaa420ab4ebc0e516db1125?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4fbadf51bbaa420ab4ebc0e516db1125"},"ref":"custom-headers","sha":"e5d27444a84218cb704f633df3adfd7d2f4b56ed","repo":{"open_issues":0,"created_at":"2011-12-11T00:33:46Z","watchers":1,"git_url":"git://github.com/tdegrunt/batman.git","updated_at":"2011-12-11T01:17:08Z","fork":true,"id":2956035,"language":"CoffeeScript","html_url":"https://github.com/tdegrunt/batman","name":"batman","description":"Fighting Crime and Kicking Apps","master_branch":null,"forks":0,"url":"https://api.github.com/repos/tdegrunt/batman","ssh_url":"git@github.com:tdegrunt/batman.git","clone_url":"https://github.com/tdegrunt/batman.git","pushed_at":"2011-12-11T01:17:08Z","owner":{"id":46554,"login":"tdegrunt","url":"https://api.github.com/users/tdegrunt","avatar_url":"https://secure.gravatar.com/avatar/4fbadf51bbaa420ab4ebc0e516db1125?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4fbadf51bbaa420ab4ebc0e516db1125"},"homepage":"batmanjs.org","size":244,"svn_url":"https://svn.github.com/tdegrunt/batman","private":false},"label":"tdegrunt:custom-headers"},"changed_files":5,"merged":true},"number":278,"action":"closed"}