Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:bbc/flashheart
Browse files Browse the repository at this point in the history
  • Loading branch information
nick spragg committed Apr 12, 2017
2 parents 511c017 + 1e19aba commit d133d06
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/cachingClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ CachingClient.prototype._handleCacheError = function (err) {
}
};

CachingClient.prototype.head = function () {
this.delegate.head.apply(this.delegate, arguments);
};

CachingClient.prototype.put = function () {
this.delegate.put.apply(this.delegate, arguments);
};
Expand Down
2 changes: 0 additions & 2 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ Client.prototype._recordStats = function (res, feedName) {
};

Client.prototype._request = function (method, url, opts, cb) {

var client = this;

opts = _.merge({
timeout: this.timeout,
headers: {
Expand Down
5 changes: 5 additions & 0 deletions test/caching.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,11 @@ describe('Caching', function () {
});
});

it('supports the HEAD method', function (done) {
api.head('/').reply(200);
client.head(url, {}, done);
});

it('supports the PUT method', function (done) {
api.put('/', {}).reply(200);
client.put(url, {}, done);
Expand Down

0 comments on commit d133d06

Please sign in to comment.