<?php
$request = new HttpRequest();
$request->setUrl('https://www.rapigo.co/api/v1/validate_address/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'postman-token' => 'bc28b90a-c12d-b8a2-b272-7f8f881052a7',
'cache-control' => 'no-cache',
'content-type' => 'application/x-www-form-urlencoded',
'authorization' => 'Basic anVsaWFuQHJhcGlnby5jbzpjb2xvbWJpYTEyMjQ='
));
$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields(array(
'address' => 'carrera 38A #25A-69'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}