Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

The beginner's avatar

Calling api and the browser keep loading

Hi,

I'm working with laravel 7, and i'm making an api call from another computer like this :

            $client = new \GuzzleHttp\Client($options);
  
            $client->request('POST', 'http://blabla/api/broadcasting',  [
                'form_params' => [
							'paramter1' => $value,
							'paramter2' => $value
                ]
            ]);

Everything was working correctly, but then suddenly when i called this api request (above) my browser was just loading without giving me any responses.

Note : this resquest was working fine. note 2 : i tried to use Http client but i had the same problem.

I don't know what's happening now, so if anybody ever faced that problem ...

Thanks.

0 likes
9 replies
Sinnbeck's avatar

Sounds like one computer can't see the other

Open a command prompt and try to ping it

ping blabla
1 like
The beginner's avatar

@Sinnbeck I tried like that

ping AdressIpOfTheOtherComputer

And this is what i recieved

1 packets transmitted, 1 received, 0% packet loss, time 12015ms

So i think that was not the problem or maybe i'm doing it the wrong way ?

Sinnbeck's avatar

@The beginner can you call a GET endpoint on the other server in the browser?

1 like
Sinnbeck's avatar

@The beginner how about if you use postman? Does that work with the POST endpoint?

If not, can you show the code on the server?

1 like
The beginner's avatar

@Sinnbeck Thanks for your help sir... I don't know what was happening but it works fine now .... :)

Snapey's avatar

Sounds like you are using php Artisan Serve

(which is single threaded)

1 like

Please or to participate in this conversation.