AOTG API: Delete Debtor: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 78: | Line 78: | ||
200 OK |
200 OK |
||
====Response Successful Body==== |
====Response Successful Body==== |
||
<syntaxhighlight lang="json-object"> |
<syntaxhighlight lang="json-object" highlight="2,3"> |
||
{ |
{ |
||
"Id": "f0268032-c161-4548-a74a-adb7143274a6", |
"Id": "f0268032-c161-4548-a74a-adb7143274a6", |
||
Line 97: | Line 97: | ||
|PHPHttp= |
|PHPHttp= |
||
<syntaxhighlight lang="PHP"> |
<syntaxhighlight lang="PHP"> |
||
<?php |
|||
$request = new HttpRequest(); |
|||
$request->setUrl('http://aotg.cloud:8080/api/public/v1/Result/f0268032-c161-4548-a74a-adb7143274a6'); |
|||
$request->setMethod(HTTP_METH_GET); |
|||
$request->setHeaders(array( |
|||
'cache-control' => 'no-cache', |
|||
'SOTC_AUTH' => 'SAMc13a36d2-a139-e911-b8b3-000d3aa04f3d' |
|||
)); |
|||
try { |
|||
$response = $request->send(); |
|||
echo $response->getBody(); |
|||
} catch (HttpException $ex) { |
|||
echo $ex; |
|||
} |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
|RestSharp= |
|RestSharp= |
||
<syntaxhighlight lang="C#"> |
<syntaxhighlight lang="C#"> |
||
var client = new RestClient("http://aotg.cloud:8080/api/public/v1/Result/f0268032-c161-4548-a74a-adb7143274a6"); |
|||
var request = new RestRequest(Method.GET); |
|||
request.AddHeader("cache-control", "no-cache"); |
|||
request.AddHeader("SOTC_AUTH", "SAMc13a36d2-a139-e911-b8b3-000d3aa04f3d"); |
|||
IRestResponse response = client.Execute(request); |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
|PHPcURL= |
|PHPcURL= |
||
<syntaxhighlight lang="PHP"> |
<syntaxhighlight lang="PHP"> |
||
<?php |
|||
$curl = curl_init(); |
|||
curl_setopt_array($curl, array( |
|||
CURLOPT_PORT => "8080", |
|||
CURLOPT_URL => "http://aotg.cloud:8080/api/public/v1/Result/f0268032-c161-4548-a74a-adb7143274a6", |
|||
CURLOPT_RETURNTRANSFER => true, |
|||
CURLOPT_ENCODING => "", |
|||
CURLOPT_MAXREDIRS => 10, |
|||
CURLOPT_TIMEOUT => 30, |
|||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, |
|||
CURLOPT_CUSTOMREQUEST => "GET", |
|||
CURLOPT_POSTFIELDS => "", |
|||
CURLOPT_HTTPHEADER => array( |
|||
"SOTC_AUTH: SAMc13a36d2-a139-e911-b8b3-000d3aa04f3d", |
|||
"cache-control: no-cache" |
|||
), |
|||
)); |
|||
$response = curl_exec($curl); |
|||
$err = curl_error($curl); |
|||
curl_close($curl); |
|||
if ($err) { |
|||
echo "cURL Error #:" . $err; |
|||
} else { |
|||
echo $response; |
|||
} |
|||
</syntaxhighlight> |
</syntaxhighlight> |
||
}} |
}} |