Chilkat Online Tools

Foxpro / APPIA API / GET ESCROW(RECEIVE)

Back to Collection Items

LOCAL loHttp
LOCAL lnSuccess
LOCAL loJson
LOCAL loSbRequestBody
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')

* Use this online tool to generate code from sample JSON: Generate Code to Create JSON

* The following JSON is sent in the request body.

* {}

loJson = CreateObject('Chilkat_9_5_0.JsonObject')

* Adds the "Authorization: Bearer <access_token>" header.
loHttp.AuthToken = "<access_token>"

loSbRequestBody = CreateObject('Chilkat_9_5_0.StringBuilder')
loJson.EmitSb(loSbRequestBody)

loResp = loHttp.PTextSb("GET","https://domain.com/escrow/receive/kFYHM0Qi",loSbRequestBody,"utf-8","application/json",0,0)
IF (loHttp.LastMethodSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    RELEASE loJson
    RELEASE loSbRequestBody
    CANCEL
ENDIF

? STR(loResp.StatusCode)
? loResp.BodyStr
RELEASE loResp

RELEASE loHttp
RELEASE loJson
RELEASE loSbRequestBody

Curl Command

curl -X GET
	-H "Authorization: Bearer <access_token>"
	-d '{
  
}'
https://domain.com/escrow/receive/kFYHM0Qi

Postman Collection Item JSON

{
  "name": "GET ESCROW(RECEIVE)",
  "protocolProfileBehavior": {
    "disableBodyPruning": true
  },
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{auth}}",
          "type": "string"
        }
      ]
    },
    "method": "GET",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{url}}/escrow/receive/kFYHM0Qi",
      "host": [
        "{{url}}"
      ],
      "path": [
        "escrow",
        "receive",
        "kFYHM0Qi"
      ]
    }
  },
  "response": [
  ]
}