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: "synopsis")
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=synopsis"
-u '{{webservice_key}}:password'
https://localhost:8080/api/products
Postman Collection Item JSON
{
"name": "Get product synopsis schema",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{webservice_url}}/api/products?schema=synopsis",
"host": [
"{{webservice_url}}"
],
"path": [
"api",
"products"
],
"query": [
{
"key": "schema",
"value": "synopsis"
}
]
}
},
"response": [
]
}