PSR-7 interfaces instead of \OCP\Http\Client\IClient

This is more or less like Do we still need `\OCP\IContainer`? but for a different API.

We have our own way of abstracting Guzzle. However, there is a well defined API for a php HTTP client and most HTTP libs support this. Thus I think it would be a good move to adapt this standard. Then Nextcloud code is less off-standard and looks more like any other php application, lowering the barrier for php devs new to Nextcloud.

This would also help with problems like the missing error handling typing of our current code where you only get \Exceptions and no specific errors that you could properly handle.



1 Like