You currently support the methods for: GET, POST, PUT, DELETE.
The following methods have not been added:
PATCH - Modifies a target resource rather than using DELETE & PUT
TRACE - Useful for traceback if implemented on the target server.
HEAD - Useful for getting only headers, similar to GET
OPTIONS - (mainly CORS & prefilighted), While not really useful, you can use it to extract content-type information and related fields.
I imagine we could continue to implement this using the current approach, however maybe adding a "dynamic method task" for executing other request types might be useful for niche use cases? Something like this:
public static function dynamicRequest(string $uri, array|string $args, int $timeout = 10, array $headers = [], array $extraCurlOpts = [], Closure $closure = null): void {
// .. submit task to threadpool.
}
You currently support the methods for:
GET,POST,PUT,DELETE.The following methods have not been added:
PATCH- Modifies a target resource rather than usingDELETE&PUTTRACE- Useful for traceback if implemented on the target server.HEAD- Useful for getting only headers, similar toGETOPTIONS- (mainly CORS & prefilighted), While not really useful, you can use it to extract content-type information and related fields.I imagine we could continue to implement this using the current approach, however maybe adding a "dynamic method task" for executing other request types might be useful for niche use cases? Something like this: