How can I pass User-Agent
header with a especial curl parameter -A
, not -H
?
This code adds User-Agent
with -H
parameter, not -A
:
Http::withHeaders(['User-Agent' => 'Mozilla/5.0 (Android 13; Mobile; rv:109.0) Gecko/111.0 Firefox/111.0'])
This code has no effect:
Http::beforeSending(function(IlluminateHttpClientRequest $request) {
$request->toPsrRequest()
->withHeader('User-Agent', 'Mozilla/5.0 (Android 13; Mobile; rv:109.0) Gecko/111.0 Firefox/111.0');
});
2
Answers
Got nothing as User-Agent:
What about