Back to Collection Items
func chilkatTest() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = CkoHttp()!
var success: Bool
http.basicAuth = true
http.login = "{{webservice_key}}"
http.password = "password"
let queryParams = CkoJsonObject()!
queryParams.update("schema", value: "blank")
var resp: CkoHttpResponse? = http.quickRequestParams("GET", url: "https://localhost:8080/api/products", json: queryParams)
if http.lastMethodSuccess == false {
print("\(http.lastErrorText!)")
return
}
print("\(resp!.statusCode.intValue)")
print("\(resp!.bodyStr!)")
resp = nil
}
Curl Command
curl -G -d "schema=blank"
-u '{{webservice_key}}:password'
https://localhost:8080/api/products
Postman Collection Item JSON
{
"name": "Get product blank schema",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{webservice_url}}/api/products?schema=blank",
"host": [
"{{webservice_url}}"
],
"path": [
"api",
"products"
],
"query": [
{
"key": "schema",
"value": "blank"
}
]
}
},
"response": [
]
}