appendto/jquery-mockjax — pull request #89 by vizio360 (2013-01-21 23:55:09+00:00)
Title: added request headers matching

Added the ability to match request headers.

I'm in the middle of testing some oauth2 services and I needed an easy way to create mocks which would be valid only if an ```Authorization``` header was sent in the request.

This pull requests adds a new property you can define in the mockjax options object called ```requestHeaders```.
```requestHeaders``` is just an object with key, value pairs defining which headers are needed by the request to be validated.

here is an example which will match all the requests to /me only if the request includes an header called ```Authorization``` with value ```"Bearer vsdfjsdf+adfvadfv="```
```
$.mockjax({
url: "/me",
requestHeaders: {
Authorization: "Bearer vsdfjsdf+adfvadfv="
},
responseText: "YEAH!"
}
```