Chilkat Online Tools

Perl / Belvo API Docs / List

Back to Collection Items

use chilkat();

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

$http = chilkat::CkHttp->new();

$http->put_BasicAuth(1);
$http->put_Login("{{secretId}}");
$http->put_Password("{{secretPassword}}");

$queryParams = chilkat::CkJsonObject->new();
$queryParams->UpdateInt("page",1);

# resp is a HttpResponse
$resp = $http->QuickRequestParams("GET","https://domain.com/investments/portfolios/",$queryParams);
if ($http->get_LastMethodSuccess() == 0) {
    print $http->lastErrorText() . "\r\n";
    exit;
}

print $resp->get_StatusCode() . "\r\n";
print $resp->bodyStr() . "\r\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": [
  ]
}