<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://mydata-prod-apim.azure-api.net/myDATA/SendInvoices');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'aade-user-id' => 'a-tsiakiroudi',
    'Ocp-Apim-Subscription-Key' => '{0b3e2f206af24e20b4356e490114ed65}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_POST);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>