Back to Collection Items
#import <CkoHttp.h>
#import <CkoJsonObject.h>
#import <CkoHttpResponse.h>
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkoHttp *http = [[CkoHttp alloc] init];
BOOL success;
http.BasicAuth = YES;
http.Login = @"{{webservice_key}}";
http.Password = @"password";
CkoJsonObject *queryParams = [[CkoJsonObject alloc] init];
[queryParams UpdateString: @"schema" value: @"synopsis"];
CkoHttpResponse *resp = [http QuickRequestParams: @"GET" url: @"https://localhost:8080/api/products" json: queryParams];
if (http.LastMethodSuccess == NO) {
NSLog(@"%@",http.LastErrorText);
return;
}
NSLog(@"%d",[resp.StatusCode intValue]);
NSLog(@"%@",resp.BodyStr);
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": [
]
}