processwire / processwire-requests

ProcessWire feature requests.
40 stars 0 forks source link

WireHTTP more http methods #505

Closed jlahijani closed 9 months ago

jlahijani commented 1 year ago

WireHTTP supports these methods:

protected $allowHttpMethods = array('GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'PATCH'); 

Would it be possible to add 'OPTIONS' and 'CONNECT' and 'TRACE'? 'OPTIONS' is definitely useful when working with 3rd party APIs (including the AppAPI PW module, which itself is a API creator for ProcessWire).

https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods

ryancramerdesign commented 10 months ago

Thanks @jlahijani I have added those http methods to the allowed list in WireHttp. To use them, you would use the WireHttp::send() method.