-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Description
Symfony version(s) affected
7.4.0
Description
When defining a scoped client with a base_uri and caching, an InvalidArgumentException exception is thrown when making a request.
Invalid URL: scheme is missing in "/posts". Did you forget to add "http(s)://"?
Without caching, the request is perform as normal.
How to reproduce
framework:
http_client:
scoped_clients:
example.client:
base_uri: 'https://jsonplaceholder.typicode.com'
headers:
Accept: 'application/json'
caching:
cache_pool: example_cache_pool
cache:
pools:
example_cache_pool:
default_lifetime: 3600
tags: true$response = $exampleClient->request('GET', '/posts');
echo $response->getContent();Possible Solution
No response
Additional Context
No response