Chilkat Online Tools

Xojo / APPIA API / FETCH AN ESCROW DETAILS

Back to Collection Items

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

Dim http As New Chilkat.Http
Dim success As Boolean

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

// The following JSON is sent in the request body.

// {
//   "trans_amount": 3000,
//   "trans_name": "mobile phone",
//   "details": "buying and selling"
// }

Dim json As New Chilkat.JsonObject
success = json.UpdateInt("trans_amount",3000)
success = json.UpdateString("trans_name","mobile phone")
success = json.UpdateString("details","buying and selling")

// Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>"

Dim sbRequestBody As New Chilkat.StringBuilder
success = json.EmitSb(sbRequestBody)

Dim resp As Chilkat.HttpResponse
resp = http.PTextSb("GET","https://domain.com/escrow/",sbRequestBody,"utf-8","application/json",False,False)
If (http.LastMethodSuccess = False) Then
    System.DebugLog(http.LastErrorText)
    Return
End If

System.DebugLog(Str(resp.StatusCode))
System.DebugLog(resp.BodyStr)

Curl Command

curl -X GET
	-H "Authorization: Bearer <access_token>"
	-d '{
    "trans_amount": 3000,
    "trans_name": "mobile phone",
    "details": "buying and selling"
}'
https://domain.com/escrow/

Postman Collection Item JSON

{
  "name": "FETCH AN ESCROW DETAILS",
  "protocolProfileBehavior": {
    "disableBodyPruning": true
  },
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{auth}}",
          "type": "string"
        }
      ]
    },
    "method": "GET",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"trans_amount\": 3000,\n    \"trans_name\": \"mobile phone\",\n    \"details\": \"buying and selling\"\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{url}}/escrow/",
      "host": [
        "{{url}}"
      ],
      "path": [
        "escrow",
        ""
      ]
    }
  },
  "response": [
  ]
}