Objective-C
Objective-C
ISBNdb API v2 Get Book Details
See more HTTP Misc Examples
Demonstrates how to send a GET request to the ISBNdb API v2 with Authorization header.Chilkat Objective-C Downloads
#import <CkoHttp.h>
#import <NSString.h>
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkoHttp *http = [[CkoHttp alloc] init];
[http SetRequestHeader: @"Authorization" value: @"YOUR_REST_KEY"];
NSString *jsonStr = [http QuickGetStr: @"https://api2.isbndb.com/book/9780134093413"];
if (http.LastMethodSuccess == NO) {
NSLog(@"%@",http.LastErrorText);
return;
}
NSLog(@"%@%d",@"Response status code: ",[http.LastStatus intValue]);
NSLog(@"%@",@"Response JSON:");
NSLog(@"%@",jsonStr);