Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Many people find that the AFNetworking framework (GIT clone from <a href="https://github.com/AFNetworking/AFNetworking" rel="nofollow">https://github.com/AFNetworking/AFNetworking</a>) makes HTTP interactions much easier.</p> <p>Specifically, AFNetworking <code>getPath:</code> and <code>postPath:</code> methods accept a <code>path</code>, a <code>parameters</code> dictionary, and then two blocks, one for <code>success</code> and one for <code>failure</code>. As such</p> <pre><code>{ [self getPath: @"users" parameters: @{ @"api_key" : @"AppAPIKeyForServer" } success: ^(AFHTTPRequestOperation *operation, NSDictionary *json) { NSArray *users = json[@"users"]; .... } failure: ...]; } </code></pre> <p>Creating AFNetworking clients is easy as well. You can create a simple HTTP client or even for OAuth2 client:</p> <pre><code>@interface MyClient : AFOAuth2Client @end - (MyClient *) init { if (self = [super initWithBaseURL: [NSURL URLWithString: kMyClientAPIBaseURLString] clientID: kMyClientOAuth2ClientId secret: kMyClientOAuth2ClientSecret]) { [self registerHTTPOperationClass: [AFJSONRequestOperation class]]; [self setDefaultHeader: @"Accept" value: @"application/json"]; } return self; } </code></pre> <p>As for your daemon need. You should be able to have your daemon retain a pointer to the AFNetworking client and then make repeated requests.</p> <p>Note that an OAuth2 client is found at <a href="https://github.com/AFNetworking/AFOAuth2Client" rel="nofollow">https://github.com/AFNetworking/AFOAuth2Client</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload