Questions tagged [sendasynchronousrequest]
100 questions
0
votes
1 answer
Handle 401 status code with sendAsynchronousRequest:request API in iOS
I am using this way API to login in my app.
NSString *url = [NSString stringWithFormat:@"%@//login",xyz];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
NSError *error;
NSData *jsonData =…

Ranjit
- 4,576
- 11
- 62
- 121
0
votes
1 answer
How to use Asihttprequest asynchronous requests server?
My server login parameters:
username
password (md5 encrypted)
logintype
Return parameter:
userId
username
levelid
mobilenum
email
0 Success
10001 account name can not be empty
10002 account does not exist
10003 password is incorrect
10004…

kevin
- 11
- 2
0
votes
1 answer
Variable only updated in the sendAsynchronousRequest
Example of what i wan't to do:
var b = 0
let URL: NSURL = NSURL(string: "[URL to php file]")!
let request:NSMutableURLRequest = NSMutableURLRequest(URL: URL)
request.HTTPMethod = "POST"
request.HTTPBody =…

Clément Bisaillon
- 5,037
- 8
- 32
- 53
0
votes
2 answers
how to show fetch data by using NSURL sendAsynchronousRequest
I have seen a lot of tutorials about nsurl asynchronous. I followed those tutorials and implement following.
-(id) connect_asych:(NSDictionary *)input page:(NSString *)page{
NSString* urlString= [@"*s.com/music/" stringByAppendingString:page];
…

user2612912
- 63
- 1
- 6
0
votes
1 answer
How to perform multi AsynchronousRequests in ios
i have a UITableView which shows (doctor image , doctor Name)
In the cellForRowAtIndexPath function iam fetching the images as follow:
[NSURLConnection sendAsynchronousRequest:request
…

user967555
- 1
- 2
0
votes
2 answers
NSURLConnection SendAsynchronousRequest not working without Wi-Fi
Requests don't seem to be sent when in 3G. The code is called and it returns to the callback with a -1001 error and the following message: "(The request timed out.)"
Protocol is HTTP, not HTTPs.
Code works fine in Wi-Fi.
Wireshark on the server does…

aout
- 300
- 1
- 2
- 10
0
votes
1 answer
ios sendAsynchronousRequest timer
This is my situation:
Im using sendAsynchronousRequest. I quickly relized that it has a default timeout of 60 seconds. My app is designed to wait for an opponent to start the game (its a word-game).
Actually, it could take hours before the opponent…

user3355182
- 151
- 1
- 2
- 11
0
votes
4 answers
NSURLConnection sendAsynchronousRequest: How to check finished status code?
So I have some code like so:
@interface RequestHandler()
@property (nonatomic) NSInteger statusCode;
@end
@implementation RequestHandler
- (bool)sendRequest:(NSString *)surveyorId withData:(NSData *)requestData
{
[[NSURLConnection alloc]…

Kevin Lee
- 1,104
- 3
- 13
- 33
0
votes
0 answers
two threads in asynchronuous calls using each others data in .net webservice
I have a web method to get the flight data from airline, we make asynchronous call to get available flights and then for each flight we again make again make asynchronous call to get the price. It looks like one thread is making using of the…

Shamil
- 13
- 2
0
votes
1 answer
How to know how many asynchronous calls are pending
I'm using the following code to make multiple async. calls and I need to know how many of those calls are pending for validating purposes.
function llenarComboMetodos(cell) {
var xhr;
if (window.XMLHttpRequest) {
xhr = new…

Valkzer
- 105
- 1
- 7
0
votes
1 answer
NSURLConnection gets a NULL value from server though response data is not NULL - iOS
In my app I am establishing a connection with the server and try getting a JSON data from the server. When I sent the request, within moments a JSON object is generated in the server and it is sent back to the client (app). But the issue is 2 times…

Timothy Rajan
- 1,947
- 8
- 38
- 62
0
votes
1 answer
sendAsynchronousRequest and completionHandler in return method
How can I return data when completionHandler finishes? I tried this method, but it shows an error:
- (NSData *)ReturnDataFromUrl{
NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com"]];
…

Fawaz
- 584
- 1
- 11
- 24
0
votes
1 answer
objective c synchronousrequest query
I am trying to use some objective c code to upload an image and some text data to my webserver which all works fine. I was just trying to add a basic progress indication "text box" to my display to show the progress i.e say "uploading"
I am using…

user1096447
- 429
- 1
- 7
- 22
0
votes
0 answers
Is sendasyncrequest really worthless?
So till some point of time I used this:
[NSURLConnection sendAsynchronousRequest:request
queue:[NSOperationQueue mainQueue]
completionHandler:^(NSURLResponse *response, NSData *data,…

Noobass
- 1,974
- 24
- 26
0
votes
1 answer
DBAccess with async
The app I'm building has a lot of tables. I'm loading data for the first 15 rows, and when the user scrolls down, I'm getting the next batch of 15 rows.
I have written some DBAccess functions that takes in a 'count' and 'skip'. When loading the…

Jason
- 1,787
- 4
- 29
- 46