aacerox / node-rest-client

REST API client from node.js
MIT License
377 stars 132 forks source link

Can we support HTTP PURGE #127

Closed tchcxp closed 7 years ago

tchcxp commented 8 years ago

Hi there,

I tried to call HTTP PURGE method:

  client.registerMethod("purge", url, "PURGE");
  client.methods.purge((data, response) => { ... }

But then I got errors:

TypeError: httpMethod is not a function
    at Object.purge (/Users/chenghuang/dev/auto-cache-clear/node_modules/node-rest-client/lib/node-rest-client.js:290:13)

I understand PURGE is not a HTTP standard method, but is there any chance we support it? Thanks!

aacerox commented 7 years ago

Hi in next version there will be the possibility to create custom HTTP Methods. I hope to release it before christmas 2016.

Thnx.