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

aurorame's avatar

http::withToken return cURL error 28:

Hello,i make http request via Http::withToken and sometimes get error: GuzzleHttp\\Exception\\ConnectException(code: 0): cURL error 28: Operation timed out after 30002 milliseconds with 0 bytes received how i can fix this? My code look like:

		$request->validate([
            'data' => ['required', 'integer'],
        ]);


        return Http::withToken(config('external'))
            ->get($url, [
                'request_data' => $request->input('data')
            ]);
0 likes
3 replies
aurorame's avatar
aurorame
OP
Best Answer
Level 2

problem solved by add timeout to request: Http::timeout(60)->withToken...

2 likes

Please or to participate in this conversation.