Hey I create a Laravel 5.4 Application with GuzzleHttp. When I host it in the PHP server and Try to post request to another API hosted in DigitalOcean(NodeJS App) it gives the above error. But It works in the Localhost well.
My Guzzle Request is here.
$client = new Client([
'base_uri' => '',
'timeout' => 0,
'connect_timeout' => 0,
'headers' => [
'Content-Type' => 'application/json',
],]);
$response = $client->request('POST', $target, [
'json' => [
'HotelID' => $user,
'authcode' => $authcode,
'userData' => [
'NIC' => $NIC,
'Name' => $name
],
'reservation' => [
'checkin_date' => $checkin_date,
'checkout_data' => $checkout_data,
'payment' => $payment
],
'rooms' => [
'TypeA' => $TypeA_rooms,
'TypeB' => $TypeB_rooms,
'TypeC' => $TypeC_rooms,
'TypeD' => $TypeD_rooms,
'TypeE' => $TypeE_rooms,
'TypeF' => $TypeF_rooms
]
]]);
How I fix this issue. Help me.