我在QuickBlox
中有一个自定义表,我想检索该表的数据
NSURL *topPlaceURL = [NSURL URLWithString:@"https://api.quickblox.com/data/TopChatPoints.json"];
NSURLRequest * jsonRequest = [NSURLRequest requestWithURL:topPlaceURL];
[[NSURLConnection alloc]initWithRequest:jsonRequest delegate:self];
-(void) connection: (NSURLConnection *) connection didReceiveResponse:(NSURLResponse *)response
{
jsonData = [[NSMutableData alloc]init];
}
-(void) connection: (NSURLConnection *) connection didReceiveData:(NSData *)data
{
[jsonData appendData:data];
}
-(void) connectionDidFinishLoading: (NSURLConnection *) connection
{
jsonArray = [NSJSONSerialization JSONObjectWithData:jsonData options:kNilOptions error:nil];
NSLog(@"MY TOP PLACE = %@",jsonArray);
}
但我没有收到数据,因为我没有通过auth key
如何生成auth key
并将其与NSURLRequest
一起发送?