Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JSON-RPC client for iOS, based on AFNetworking
branch: master

This branch is 12 commits behind wiistriker:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
AFJSONRPCClient.h
AFJSONRPCClient.m
README.markdown

README.markdown

Simple JSON-RPC Client based on top of AFNetworking (https://github.com/AFNetworking/AFNetworking)

http://json-rpc.org/

Example Usage

AFJSONRPCClient *client = [[AFJSONRPCClient alloc] initWithURL:[NSURL URLWithString:@"http://path.to/json-rpc/service/"]];

[client invokeWithMethod:@"method.name" success:^(AFHTTPRequestOperation *operation, id responseObject) {
    //success handling
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    //error handling
}];

[client invokeWithMethod:@"method.name" parameters:[NSArray arrayWithObjects:@"1", @"2", nil] success:^(AFHTTPRequestOperation *operation, id responseObject) {
    //success handling
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    //error handling
}];

[client invokeWithMethod:@"method.name" parameters:[NSArray arrayWithObject:@"1"] withRequestId:@"2" success:^(AFHTTPRequestOperation *operation, id responseObject) {
    //success handling
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    //error handling
}];
Something went wrong with that request. Please try again.