I'm creating a Laravel project and trying to display a HTML response in a GET API.
My goal is when a user clicks the button / href, a new tab will open and he/she will be redirected to the HTML response from the GET API.
Here's my sample Guzzle HTTP
$client_two = new \GuzzleHttp\Client();
$payload_two = $client_two->request('GET','sample url' ,[
'auth' => ['test', 'key'],
'headers' => ['content-type' => 'application/json', 'Accept' => '*'],
'query' => [
'user_id' => $details['user_id'],
'login_auth_key' => $details['login_auth_key']
]
]);
Here's a snippet of the HTML response from POSTMAN
<!DOCTYPE html>
<html lang="en">
<head>
<title> HomePage </title>
</head>
<body>
<div id="pageLoader" style="display: none;">
<div class="connectLoader">
<span>
Connecting...
</span>
</div>
</div>
<div id="header-logo">
<a href="#" class="logo-content-big" title="Multiline Verve">
<i>Multiline</i>
<span>Contact Multiline</span>
</a>
</div>
</body>
</html>
Any suggestions on how to do this?