You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes it happens that Contentful is used to serve contents that are not critical for a website, such as background images.
In these situations it would be preferrable to use short timeouts for these non-critical requests, so that a slow response from Contentful will not impair the operation of the whole website.
I'm aware that it is possible to specify a custom GuzzleHttp client (with a custom timeout value) in the ClientOptions, but that is quite cumbersome to change just one configuration option, and it only allows one to set a single, global timeout value for all requests that will use that client. Being able to specify a timeout value on a request-by-request basis would allow far more flexibility.
I was thinking of an options argument to be added to all Contentful\Delivery\Client\ClientInterface methods that involve API calls, with a default value of an empty array. When one specifies something in there, those values are merged with the underlying client option for just that request.
Of course changing the interface would be a BC break. Not for those who merely call the interface methods, but for everyone who implements it.
The text was updated successfully, but these errors were encountered:
Sometimes it happens that Contentful is used to serve contents that are not critical for a website, such as background images.
In these situations it would be preferrable to use short timeouts for these non-critical requests, so that a slow response from Contentful will not impair the operation of the whole website.
I'm aware that it is possible to specify a custom GuzzleHttp client (with a custom timeout value) in the ClientOptions, but that is quite cumbersome to change just one configuration option, and it only allows one to set a single, global timeout value for all requests that will use that client. Being able to specify a timeout value on a request-by-request basis would allow far more flexibility.
I was thinking of an
options
argument to be added to allContentful\Delivery\Client\ClientInterface
methods that involve API calls, with a default value of an empty array. When one specifies something in there, those values are merged with the underlying client option for just that request.Of course changing the interface would be a BC break. Not for those who merely call the interface methods, but for everyone who implements it.
The text was updated successfully, but these errors were encountered: