Chilkat Online Tools

TCL / PrestaShop Webservice Demo Resource / Get article blank schema

Back to Collection Items

load ./chilkat.dll

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

set http [new_CkHttp]

CkHttp_put_BasicAuth $http 1
CkHttp_put_Login $http "{{webservice_key}}"
CkHttp_put_Password $http "password"

set queryParams [new_CkJsonObject]

CkJsonObject_UpdateString $queryParams "schema" "blank"

# resp is a CkHttpResponse
set resp [CkHttp_QuickRequestParams $http "GET" "https://localhost:8080/api/articles" $queryParams]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    delete_CkJsonObject $queryParams
    exit
}

puts [CkHttpResponse_get_StatusCode $resp]
puts [CkHttpResponse_bodyStr $resp]
delete_CkHttpResponse $resp


delete_CkHttp $http
delete_CkJsonObject $queryParams

Curl Command

curl -G -d "schema=blank"
	-u '{{webservice_key}}:password'
https://localhost:8080/api/articles

Postman Collection Item JSON

{
  "name": "Get article blank schema",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{webservice_url}}/api/articles?schema=blank",
      "host": [
        "{{webservice_url}}"
      ],
      "path": [
        "api",
        "articles"
      ],
      "query": [
        {
          "key": "schema",
          "value": "blank"
        }
      ]
    }
  },
  "response": [
  ]
}