processwire / processwire-requests

ProcessWire feature requests.
39 stars 0 forks source link

WireHTTP more http methods #505

Closed jlahijani closed 4 months ago

jlahijani commented 8 months 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 5 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.