Category: symfony-http-client

Request self api with Symfony and Api Platform

I used Api Platform with Symfony 4.4 Front: API: Api call from front controller: $client = HttpClient::create(); $response = $client->request(‘GET’, ‘’); Error: Idle timeout reached for ““ Source: Symfony Questions

Symfonty HttpClient GET request with multiple query string parameters with same name

I am trying to make an API request in the following format: /api/v1/courses?enrollment_state=active&include[]=total_students&include[]=term How can I do so using the HttpClient Component query string parameters? $response = $client->request(‘GET’, ‘/api/v1/courses’, [ ‘query’ => [ ‘enrollment_state’ => ‘active’, ‘include[]’ => ‘term’, ‘include[]’…

How to test a lexik_jwt_authentication protected API using http_client? [closed]

I am writing some functional test and looks like the client can’t find the controller for the route, this is the code for my test: $response = static::createClient()->request( ‘POST’, ‘/api/login_check’, [ ‘body’ => [ ‘username’ => ‘username’, ‘password’ => ‘secret123!#’…