using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://leadhootz2.p.rapidapi.com/api/personenrich/?profileUrl=andrew-jones-17240647"),
Headers =
{
{ "X-RapidAPI-Key", "YOUR API KEY HERE" },
{ "X-RapidAPI-Host", "leadhootz2.p.rapidapi.com" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', 'https://leadhootz2.p.rapidapi.com/api/personenrich/?profileUrl=andrew-jones-17240647');
xhr.setRequestHeader('X-RapidAPI-Key', 'YOUR API KEY HERE');
xhr.setRequestHeader('X-RapidAPI-Host', 'leadhootz2.p.rapidapi.com');
xhr.send(data);
GET /api/personenrich/?profileUrl=andrew-jones-17240647 HTTP/1.1
X-Rapidapi-Key: YOUR API KEY HERE
X-Rapidapi-Host: leadhootz2.p.rapidapi.com
Host: leadhootz2.p.rapidapi.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "https://leadhootz2.p.rapidapi.com/api/personenrich/?profileUrl=andrew-jones-17240647")
.setHeader("X-RapidAPI-Key", "YOUR API KEY HERE")
.setHeader("X-RapidAPI-Host", "leadhootz2.p.rapidapi.com")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://leadhootz2.p.rapidapi.com/api/personenrich/?profileUrl=andrew-jones-17240647",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-RapidAPI-Host: leadhootz2.p.rapidapi.com",
"X-RapidAPI-Key: YOUR API KEY HERE"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
import http.client
conn = http.client.HTTPSConnection("leadhootz2.p.rapidapi.com")
headers = {
'X-RapidAPI-Key': "YOUR API KEY HERE",
'X-RapidAPI-Host': "leadhootz2.p.rapidapi.com"
}
conn.request("GET", "/api/personenrich/?profileUrl=andrew-jones-17240647", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))