Back to Collection Items
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loHttp = createobject("CkHttp")
// Adds the "Authorization: Bearer {{partner_token}}" header.
loHttp.AuthToken = "{{partner_token}}"
loHttp.SetRequestHeader("Content-Type","application/json")
loSbResponseBody = createobject("CkStringBuilder")
llSuccess = loHttp.QuickGetSb("https://domain.com/",loSbResponseBody)
if (llSuccess = .F.) then
? loHttp.LastErrorText
release loHttp
release loSbResponseBody
return
endif
? "Response status code = " + str(loHttp.LastStatus)
? loSbResponseBody.GetAsString()
release loHttp
release loSbResponseBody
Curl Command
curl -X GET
-H "Authorization: Bearer {{partner_token}}"
-H "Content-Type: application/json"
https://domain.com/
Postman Collection Item JSON
{
"name": "[Partner] Get Request Resources",
"_postman_id": "5f2fe5f7-5650-4177-8956-969ecc3a6c80",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{partner_token}}",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text",
"disabled": true
}
],
"url": "{{api_host}}/partner/v2/transactions/{{transaction_id}}/request/resources"
},
"response": [
]
}