saintsystems / odata-client-php

OData Client Library for PHP
MIT License
141 stars 103 forks source link

Add option to set timeout #118

Open cweiske opened 1 year ago

cweiske commented 1 year ago

It is not possible to set a custom network timeout when using ODataClient->request().

This is because ODataRequest::_construct() sets the timeout to 0, and ODataClient->request() creates the request instance and directly executes it.

It would be nice if there was a way to override the timeout, e.g. by providing a ODataClient::createRequest method that can be overridden in subclasses (so that I don't have to override the whole ODataClient::request() method).