curl --location --request POST 'http://www.simplyapi.tk/api/email-finder/' \
--header 'api-key: 0ed3ccc12ae2b472ad0637bf3600bd0c32d6b03c' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstname":"harish",
"lastname":"sg",
"domain":"nocodeapps.io"
}'
Python for email finder API
import requests
import json
url = "http://localhost:8000/api/email-finder/"
payload = json.dumps({
"firstname": "harish",
"lastname": "sg",
"domain": "nocodeapps.io"
})
headers = {
'api-key': '0ed3ccc12ae2b472ad0637bf3600bd0c32d6b03c',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('http://localhost:8000/api/email-finder/');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'api-key' => '0ed3ccc12ae2b472ad0637bf3600bd0c32d6b03c',
'Content-Type' => 'application/json'
));
$request->setBody('{
\n "firstname":"harish",
\n "lastname":"sg",
\n "domain":"nocodeapps.io"
\n
\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}