Back to Collection Items
<?php
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.Http')
$http = new COM("Chilkat.Http");
$http->BasicAuth = 1;
$http->Login = '{{secretId}}';
$http->Password = '{{secretPassword}}';
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.JsonObject')
$queryParams = new COM("Chilkat.JsonObject");
$queryParams->UpdateInt('page',1);
// resp is a Chilkat.HttpResponse
$resp = $http->QuickRequestParams('GET','https://domain.com/investments/portfolios/',$queryParams);
if ($http->LastMethodSuccess == 0) {
print $http->LastErrorText . "\n";
exit;
}
print $resp->StatusCode . "\n";
print $resp->BodyStr . "\n";
?>
Curl Command
curl -G -d "page=1"
-u '{{secretId}}:{{secretPassword}}'
https://domain.com/investments/portfolios/
Postman Collection Item JSON
{
"name": "List",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/investments/portfolios/?page=1",
"host": [
"{{baseUrl}}"
],
"path": [
"investments",
"portfolios",
""
],
"query": [
{
"key": "page",
"value": "1"
}
]
}
},
"response": [
]
}