Questions tagged [sendasynchronousrequest]
100 questions
14
votes
3 answers
How to manage the 5 seconds response timeout limit in Dialogflow / Api.ai?
I am using Dialogflow to create an agent / bot which responds to different types of user queries with action items like "I need to get a letter from the HR for address proof". This needs the bot to fetch some information from the company's database…

Shashank
- 165
- 1
- 1
- 9
12
votes
3 answers
How to test a sendAsynchronousRequest: on XCTest
Sorry for the noob question, but I'm trying to test a connection, but I'm not able do verify the return of the request, because the test ends before the completion handler have a chance to execute. To ilustrate:
-(void)testConnection
{
…

André Henrique
- 167
- 1
- 1
- 9
12
votes
1 answer
Cancel NSURLConnection started with sendAsynchronousRequest:queue:completionHandler:?
Is it possible to cancel an NSURLConnection started with sendAsynchronousRequest:queue:completionHandler:?
Why doesn't sendAsynchronousRequest:queue:completionHandler: return the NSURLConnection object it creates so that I can cancel it?

ma11hew28
- 121,420
- 116
- 450
- 651
8
votes
2 answers
Error message : [MC] Reading from public effective user settings & [MC] System group container for systemgroup.com.apple.configurationprofiles path is
When I use the following code, I have error messages :
[NSURLConnection sendAsynchronousRequest:request queue:myQueue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
NSHTTPURLResponse *httpResponse =…

ΩlostA
- 2,501
- 5
- 27
- 63
8
votes
4 answers
Are Objective-C blocks always executed in a separate thread?
Are Objective-C blocks always executed in a separate thread?
Specifically, I'm asking about the sendAsynchronousRequest:queue:completionHandler method of the NSURLConnection class. This is the scenario:
Main thread (1st thread) calls the…

ikevin8me
- 4,253
- 5
- 44
- 84
7
votes
0 answers
Is it possible to trigger events for google spreadsheet API V4 on save of new data on googlesheet?
I am trying to fetch data from a google sheet using Google sheet API V4. Is it possible anyhow to know if someone has saved a data or made changes on the sheet? Based on that I want to make call to the api to get the data?
More like I am trying to…

Subhendu Kundu
- 3,618
- 6
- 26
- 57
7
votes
1 answer
Auto fill text on web service call response
I am new to ios programming, need to implement something like a google search box i.e., autofill text field.
My scenario is as follow
1.when user type in text field
2.background call to webservice for data(request data= text field data).
for…

Raj
- 637
- 13
- 32
6
votes
2 answers
Best way to handle multiple NSURL connections
I am trying to create an xls sheet programmatically. To fill the sheet, I am making the multiple NSURLConnection around 100. Right now, my approach is :
Make a connection and store the data into an array . This array has 100 objects.
Now take the…

ZeeroCool77
- 191
- 1
- 13
5
votes
2 answers
APNS :Error Domain = NSCocoaErrorDomain Code=3840
Im registering device data with the server, to get push notification. Here it goes the code,
[NSURLConnection sendAsynchronousRequest: request
queue: _postQueue
…

rishu1992
- 1,414
- 3
- 14
- 33
4
votes
2 answers
iOS: How to test Internet connection in the most easy way, without freezing the app (without Reachability)?
In my code I used to use three ways for checking Internet, but there is limits to them:
1/ Reachability method:
- (BOOL)isInternetOk
{
Reachability *curReach = [Reachability reachabilityWithHostName:@"apple.com"];
NetworkStatus netStatus =…

ΩlostA
- 2,501
- 5
- 27
- 63
3
votes
1 answer
How to make multiple api calls with python requests
I am trying to make parallel calls to external apis from django using requests or any other library that allows me to do this.
I have already tried using grequests to make this calls, sometimes it works but most times I get 'NoneType' object has no…

Bruce
- 103
- 1
- 8
3
votes
3 answers
How to call webService Using NSURLConnection in ios
Actually I am using now JSON classes for calling web-services but now i want to call that webservice using NSURLConnection any one provide me code for that.
Please provide me details of frameworks what i have to import.
Thank you in advance.

Hardik Vyas
- 1,973
- 1
- 20
- 43
3
votes
0 answers
Asynchronous method call in Python without creating threads or forking process?
Some years ago, (for comparison) synchronous JavaScript ajax requests were deprecated because of the overhead.
I’m in the following situation :
def ssh_network_operation_with_paramiko(string):
…

user2284570
- 2,891
- 3
- 26
- 74
3
votes
2 answers
Is there a better way to make multiple HTTP requests asynchronously in Ruby?
I'm trying to make multiple HTTP requests in Ruby. I know it can be done in NodeJS quite easily. I'm trying to do it in Ruby using threads, but I don't know if that's the best way. I haven't had a successful run for high numbers of requests (e.g.…

Steven Kutkoski
- 33
- 3
3
votes
2 answers
On iOS, how to make a cell.imageView refresh its content?
I am experimenting in tableView:cellForRowAtIndexPath to set an image by calling
[self downloadImage:urlString andSetIntoCellImageView:cell]
and in downloadImage, it will call NSURLConnection:sendAsynchronousRequest (iOS 5 and up only), and in the…

nonopolarity
- 146,324
- 131
- 460
- 740