Objective-C
Objective-C
Example: Http.GetRequestHeader method
Demonstrates theGetRequestHeader method.
Chilkat Objective-C Downloads
#import <CkoHttp.h>
#import <NSString.h>
BOOL success = NO;
CkoHttp *http = [[CkoHttp alloc] init];
NSString *hdr1 = @"X-CSRF-Token";
NSString *hdr2 = @"X-Example";
[http SetRequestHeader: hdr1 value: @"Fetch"];
[http SetRequestHeader: hdr2 value: @"123ABC"];
NSLog(@"%@%@%@",hdr1,@": ",[http GetRequestHeader: hdr1]);
NSLog(@"%@%@%@",hdr2,@": ",[http GetRequestHeader: hdr2]);
// Output:
// X-CSRF-Token: Fetch
// X-Example: 123ABC