Echo-Server icon indicating copy to clipboard operation
Echo-Server copied to clipboard

[FEATURE] Support custom HTTP verb

Open epourail opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe. I use the echo-server to fake external micro-services during some integration tests. Some requests use a custom HTTP method "BAN" that is not supported by the echo-server

Describe the solution you'd like The support to echo custom methods.

epourail avatar Jan 29 '21 14:01 epourail

Hi @epourail !

Echo-Server is based on NodeJS native http module https://nodejs.dev/learn/the-nodejs-http-module The module provides some properties and methods, and some classes.

Also, it respects all HTTP RFCs... Custom verbs are not present in their "allowlist".

> require('http').METHODS
[ 'ACL',
  'BIND',
  'CHECKOUT',
  'CONNECT',
  'COPY',
  'DELETE',
  'GET',
  'HEAD',
  'LINK',
  'LOCK',
  'M-SEARCH',
  'MERGE',
  'MKACTIVITY',
  'MKCALENDAR',
  'MKCOL',
  'MOVE',
  'NOTIFY',
  'OPTIONS',
  'PATCH',
  'POST',
  'PROPFIND',
  'PROPPATCH',
  'PURGE',
  'PUT',
  'REBIND',
  'REPORT',
  'SEARCH',
  'SUBSCRIBE',
  'TRACE',
  'UNBIND',
  'UNLINK',
  'UNLOCK',
  'UNSUBSCRIBE' ]

After several tries, I think we need to rebuild this module... Or, find a compatible module, without limitations.

Ealenn avatar Jan 31 '21 17:01 Ealenn