Back to Collection Items
; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
Local $bSuccess
$oHttp.BasicAuth = True
$oHttp.Login = "{{secretId}}"
$oHttp.Password = "{{secretPassword}}"
$oQueryParams = ObjCreate("Chilkat.JsonObject")
$oQueryParams.UpdateInt("page",1)
Local $oResp = $oHttp.QuickRequestParams("GET","https://domain.com/investments/portfolios/",$oQueryParams)
If ($oHttp.LastMethodSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
ConsoleWrite($oResp.StatusCode & @CRLF)
ConsoleWrite($oResp.BodyStr & @CRLF)
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": [
]
}