Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
260 views

I'm trying to upload a file to an API, that requires a multipart form upload. I don't want to store the file locally (I read it from an S3 bucket using flysystem) but I can'get it to work (always get ...
Oli's user avatar
  • 2,504
0 votes
1 answer
439 views

I have a function that sends requests using Symfony HTTP Client, for example, here's what that function uses to send the request: $response = $client->request($method, $url, [ '...
Simao Gomes Viana's user avatar
0 votes
0 answers
156 views

I'm building an API with Symfony and using Backblaze as a cloud storage solution. I want to allow my users to upload images that they will be allowed to use later. All my users have a specific bucket ...
BananaPB's user avatar
0 votes
0 answers
186 views

http-client version 6.3. Requests to API server are run from another server.. Both running Symfony. So there is no direct call to API from the browser and old browser is not an issue here since the ...
The50's user avatar
  • 1,198
0 votes
0 answers
723 views

there are actually two separate questions under this title I am trying to figure out how to measure the requests duration made to external services in Symfony application via the httpClient and same ...
Trayan's user avatar
  • 15
0 votes
1 answer
6k views

In the new Symfomy 5.2 a Retryable HttpClient was implemented. Failed requests can now be retried by default in case of failure. However, I could not debug or understand how the timeout option is ...
Ricardo Martins's user avatar
3 votes
1 answer
2k views

I'm trying to measure the response duration for some services called from my application. I just need a simple method and a rough value is good enough, and I thought I could simply use total_time from ...
Smaranda Dandy's user avatar
5 votes
1 answer
3k views

Is it possible to send a request using Symfony HTTP Client without awaiting the response? In my use-case some requests to my app should notify a third-party service. The response of that service is ...
simon.ro's user avatar
  • 3,350
0 votes
1 answer
1k views

I'm using httpClient on symfony and I'm calling an API I want to use the json option instead of using body but it won't work, when I use body and I type in json format everything work but I don't find ...
user avatar
0 votes
0 answers
37 views

I have Symfony application running through docker. It served on http://localhost:8000/. I'm trying to test my API routes, for example to check if they are available when JWT provided or not, check ...
Andrii Sukhoi's user avatar
3 votes
1 answer
3k views

In my Symfony project, I created a controller and a function to retrieve the content of an APi.json from a site. I am using HttpClient to grab the content and embed it into a new file in the project. ...
Math86's user avatar
  • 33
1 vote
0 answers
964 views

I use http client component in my project symfony for external apis but I found this error when i test api: SSL connect error for url configuration of component is basic configuration and also ...
dev_php_js's user avatar
1 vote
1 answer
2k views

I need to make a call to an external API. The API docs says curl_setopt($ch, CURLOPT_URL, "https://api.simkl.com/search/file"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($...
ww0k's user avatar
  • 33
4 votes
2 answers
4k views

How to intercept a request and send it with HttpClient to another server and return the response from that server after some modification? The original request will contain data and files. I am ...
Jacek Krysztofik's user avatar
10 votes
1 answer
7k views

I want to make a request to retrieve user info from OAUTH server with Symfony HttpClient but I can't fetch fetch the response directly when encountering an error response, because the client throws an ...
as-dev-symfony's user avatar
1 vote
1 answer
790 views

I'm unable to read gzip encoded response in a Symfony projet. Here is my service : <?php namespace App\Service; use Symfony\Contracts\HttpClient\HttpClientInterface; class myApi { private $...
hamza_93's user avatar
2 votes
2 answers
2k views

I want to post info to external api but I get error 422 all the time. Geting info and authorization works fine. I'm using Symfony Http Client, authorization and headers are defined in framework.yaml ...
dofado's user avatar
  • 25
0 votes
1 answer
258 views

I am using an http Client with Symfony. In this example I am creating a folder. $client = HttpClient::create(); /* @var $response ResponseInterface */ $createFolder = $client->request('MKCOL', $...
peace_love's user avatar
  • 6,523
-1 votes
2 answers
2k views

In my Symfony function I am creating a folder, and inside this folder another folder: $client = HttpClient::create(); $createFolder = $client->request('MKCOL', $path.$foldername, [ 'auth_basic' =&...
peace_love's user avatar
  • 6,523
2 votes
1 answer
3k views

With the Symfony Http Client I create a HTTP request like this: $client = HttpClient::create(); $response = $client->request('GET', 'www.mypage.com', [ 'auth_basic' => ['user', '123'], ]); ...
peace_love's user avatar
  • 6,523
1 vote
2 answers
1k views

I have tried making a HTTP request using CURL as below: $rawQuery = '{ "CUSTNAME" : "1970188", "CURDATE":"2020-12-28T00:00:00+02:00", "BOOKNUM&...
nas's user avatar
  • 2,477
0 votes
2 answers
2k views

I want to use the HttpClientInterface from symfony, so i added it in __construct like this: private HttpClientInterface $client; /** * @param HttpClientInterface $client */ public function ...
Ton Gok's user avatar
  • 152
3 votes
2 answers
11k views

I would like to attach authentication information in the header of an HTTP request using HttpClientInterface. (I already have 45 other methods that work very well) but my problem occurs when I try to ...
arno's user avatar
  • 823
0 votes
1 answer
342 views

Is it possible to connect to an API with windows Credentials? I need to connect on an API witch uses Windows AD authentication. I thought thats works with auth_basic but it's not the good way... ...
GiakAdi's user avatar
3 votes
1 answer
4k views

In my Symfony 5.1 app, I am using several scoped http clients, defined in my framework.yaml: framework: http_client: scoped_clients: my_client: .... ...
Philipp Gebert's user avatar
0 votes
3 answers
4k views

I would like to test different responses from an API using symfony/http-client, but how can I create statusCode 400? This is what I tried: public static function mockShipmentResponseFail(): ...
Gabor's user avatar
  • 155
0 votes
1 answer
5k views

I want to transform a http post request tested with post man to symfony action : I want to transform the payload to a json array in symfony to send data to url : <?php namespace App\Controller; ...
Khaled Boussoffara's user avatar
1 vote
1 answer
2k views

I have a Controller that must forward the received request (changing some query parameters) to another server, and returns it's response (with same headers, status and body). I decided to use ...
Ricardo Martins's user avatar
3 votes
1 answer
1k views

I'm using Symfony 4.4.7 and making http requests with HTTPClient (Symfony\Component\HttpClient\HttpClient) but requests doesn't shown in profiler. How to make this profiler tab work?
Vanawy's user avatar
  • 113
6 votes
1 answer
5k views

I have a class into which I inject an instance of Symfony\Component\HttpClient\HttpClient as a constructor parameter. I'm looking at the documentation page at https://symfony.com/doc/current/...
Andy's user avatar
  • 2,160
4 votes
2 answers
7k views

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 ...
user1392897's user avatar
1 vote
2 answers
3k views

I have a weird problem where a request I make (to my mercure hub) with postman works fine, however the Publisher class (from the Symfony mercure bundle), which uses the Symfony HttpClient will yield ...
mehlichmeyer's user avatar
-2 votes
1 answer
737 views

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/...
user3174311's user avatar
  • 2,033
0 votes
1 answer
681 views

In a very specific context, I need to renew my JWT after performing some actions with API Platform. I didn't find an effective way to call another route directly and so I went through a curl request. ...
Thomas Rollet's user avatar
15 votes
1 answer
10k views

I use Symfony HttpClient to call an external API. When the status code is 200 I can use getContent() method to retrieve the API response. If the API response is 400, a ClientException is thrown, and I ...
Smaranda Dandy's user avatar
2 votes
0 answers
12k views

I want to simulate this CURL command using Symfony 4 HttpClient component : curl http://localhost/endpoint -F server=123 -F user=me -F fileUrl=@/tmp/test.xml -F reply=1 I tried the Symfony doc ...
Fredo's user avatar
  • 21
2 votes
1 answer
5k views

My system needs to authenticate with an external service (out of my control in any way), and the authentication requires two HTTP requests in very short sequence (the token I get in the first request ...
yivi's user avatar
  • 48.2k
2 votes
1 answer
5k views

I need to to be authentificate when create a HTTP request, in the documentation $httpClient = HttpClient::create([ 'auth_basic' => ['[email protected]', '45@8888'], ]); $...
Hansen mattias's user avatar
1 vote
2 answers
7k views

I'm using Symfony HttpClient Component, it became necessary to use it with a proxy. Open proxy with the port, I can easily configure with the default configuration when instantiating CurlHttpClient ...
Gela P.'s user avatar
  • 23
0 votes
2 answers
680 views

We need to store our cache and log files outside of the project folder structure. I have set up parameters_prod.yml and parameters_dev.yml that will be build by Bamboo on deployment to different ...
MicWit's user avatar
  • 685
0 votes
0 answers
70 views

Can anyone point me to the place where the HttpKernel is instantiated or better asked where it is configured as a service? what I know: in symfony full stack front controller: "app_dev.php" $kernel ...
Noooooob's user avatar
2 votes
1 answer
9k views

I want to test login with facebook on a symfony webapp. I've created a test user and requested an access token for this user, now I want to send the below POST request: public function setup() { $...
user avatar
0 votes
1 answer
197 views

in app.php $kernel = new AppKernel('prod', false); in Kernel.php public function __construct($environment, $debug) { print('test'); $this->environment = $environment; ...
schlumpfi_coder's user avatar
0 votes
1 answer
1k views

I've problem with symfony2. While load page symfony load Kernel more than 1 time here is dump.. DEBUG - Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\...
Łukasz Gadzina's user avatar
0 votes
0 answers
286 views

I need to load an external AppKernel file inside my symfony application. This external AppKernel is responsible for handling requests. The problem is, It can't autoload the classes/bundles that the ...
Steffen Brem's user avatar
  • 1,758