I have a RethinkDB database with a table that contains information that I need in my iOS app. I've been told that I can use JSON and POST requests to submit/download data from the database, but am not sure how to go about doing so. Here's what I have so far:
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@:%i", hostName, portNumber]];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
[connection start];
Once the connection is opened, how do I go about querying the RethinkDB server? I want to be able to download a certain number of entries and use the built-in "limit" and sort functions. Thank you in advance.