Skip to content

Commit e4a02a0

Browse files
committed
[api] Support for HEAD. Fixes #2
1 parent 3096fdb commit e4a02a0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/mock-request.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,17 @@ MockRequest.prototype.get = function (path, headers) {
9797
return this.request('GET', path, null, headers);
9898
};
9999

100+
//
101+
// ### function head (path, headers)
102+
// #### @path {string} Path to expect in this mock request.
103+
// #### @headers {Object} **Optional** Headers to expect in this mock request.
104+
// Appends a new `HEAD` request to the sequence of mock `request/response` pairs
105+
// managed by this instance.
106+
//
107+
MockRequest.prototype.get = function (path, headers) {
108+
return this.request('HEAD', path, null, headers);
109+
};
110+
100111
//
101112
// ### function post (path, body, headers)
102113
// #### @path {string} Path to expect in this mock request.

0 commit comments

Comments
 (0)