{"action":"closed","issue":{"url":"https://api.github.com/repos/pgte/nock/issues/481","repository_url":"https://api.github.com/repos/pgte/nock","labels_url":"https://api.github.com/repos/pgte/nock/issues/481/labels{/name}","comments_url":"https://api.github.com/repos/pgte/nock/issues/481/comments","events_url":"https://api.github.com/repos/pgte/nock/issues/481/events","html_url":"https://github.com/pgte/nock/issues/481","id":135816065,"number":481,"title":"Question about reqheaders and matchHeader","user":{"login":"brian-mann","id":1268976,"avatar_url":"https://avatars.githubusercontent.com/u/1268976?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-mann","html_url":"https://github.com/brian-mann","followers_url":"https://api.github.com/users/brian-mann/followers","following_url":"https://api.github.com/users/brian-mann/following{/other_user}","gists_url":"https://api.github.com/users/brian-mann/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-mann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-mann/subscriptions","organizations_url":"https://api.github.com/users/brian-mann/orgs","repos_url":"https://api.github.com/users/brian-mann/repos","events_url":"https://api.github.com/users/brian-mann/events{/privacy}","received_events_url":"https://api.github.com/users/brian-mann/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-23T18:06:33Z","updated_at":"2016-02-24T14:32:53Z","closed_at":"2016-02-24T14:32:53Z","body":"Why do these options both exist?\r\n\r\nWhen would you ever need to specifically use one vs the other since they can both take strings, regexp or callback functions?\r\n\r\nI guess the object literal pattern of the first may be useful in specific testing scenarios vs the fluent API, but it seems like unnecessarily increasing the surface area of the API.\r\n\r\n```js\r\nnock(\"http://google.com\", {\r\n  reqheaders: {\r\n    \"x-foo\": \"bar\"\r\n  }\r\n})\r\n```\r\n\r\nvs\r\n\r\n```js\r\nnock(\"http://google.com\")\r\n.matchHeader(\"x-foo\", \"bar\")\r\n```\r\n"}}