I have two app in Laravel. One is simple api with one controller if i send params using online tool or postman app everything is ok. i need check in headers to send ‘Host’ without this header i got error 400 Bad Request. But if i try send the same from my second laravel app i’ve got empty params request
$response = Http::asForm()->withHeaders([
'Host' => 'example.com:8091',
])->post('http://example.com:8091/abc/test/', [
'param_1' => 'abcdefgh123',
'param2' => '+447707303095',
]);
$body = $response->getBody()->getContents();
I tried asForm()
and nothing. What should be in Host header ?