Back to Collection Items
LOCAL loHttp
LOCAL lnSuccess
LOCAL loQueryParams
LOCAL loResp
* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
loHttp = CreateObject('Chilkat_9_5_0.Http')
loQueryParams = CreateObject('Chilkat_9_5_0.JsonObject')
loQueryParams.UpdateString("requested-by[login]","CoupaSam")
* Adds the "Authorization: Bearer <access_token>" header.
loHttp.AuthToken = "<access_token>"
loResp = loHttp.QuickRequestParams("GET","https://domain.com/requisitions",loQueryParams)
IF (loHttp.LastMethodSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
RELEASE loQueryParams
CANCEL
ENDIF
? STR(loResp.StatusCode)
? loResp.BodyStr
RELEASE loResp
RELEASE loHttp
RELEASE loQueryParams
Curl Command
curl -G -d "requested-by[login]=CoupaSam"
-H "Authorization: Bearer <access_token>"
https://domain.com/requisitions
Postman Collection Item JSON
{
"name": "Retrieve Requisitions by User Login",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{URL}}/requisitions?requested-by[login]=CoupaSam",
"host": [
"{{URL}}"
],
"path": [
"requisitions"
],
"query": [
{
"key": "requested-by[login]",
"value": "CoupaSam"
}
]
}
},
"response": [
]
}