on iOS , NSURLRequest objects represent a URL load request in a manner independent of protocol and URL scheme. NSURLRequest encapsulates two basic data elements of a load request: the URL to load, and the policy to use when consulting the URL content cache made available by the implementation.
Questions tagged [nsurlrequest]
1095 questions
0
votes
1 answer
Handling redirected HTTP POST requests with empty body in iOS
I am working on an iOS app which interacts with a remote WS.
As the URL of the WS might change from time to time, the app should send all the requests to a fixed and stable URL which takes care of redirecting them to the actual URL of the WS.
Here…

pAkY88
- 6,262
- 11
- 46
- 58
0
votes
3 answers
I need the correct syntax for the setValue:forHTTPHeaderField: method on NSMutableURLRequest
I am pulling my hair out trying to conjure up the correct syntax to set the HTTP header information do a byte-range load from an HTTP server.
This is the offending method on NSMutableURLRequest
- (void)setValue:(NSString *)value…

dugla
- 12,774
- 26
- 88
- 136
0
votes
2 answers
Class NSURLRequest. Method - (NSInputStream *)HTTPBodyStream always returns nil. Why?
I am trying to use NSURLRequest with NSURLConnection to establish a binary stream connection to an HTTP server to retrieve a humungous data file in small, incrementally pieces.
I see the method - (NSInputStream *)HTTPBodyStream on NSURLRequest. Is…

dugla
- 12,774
- 26
- 88
- 136
0
votes
2 answers
Can't POST a request to service
For some reason I always get Endpoint not found., but when I put it in the browser it works perfectly. I'm sure doing something wrong..
- (void)requestLoad:(NSString *)req_udid Age:(NSString *)req_age Gender:(NSString *)req_gender…

ytpm
- 4,962
- 6
- 56
- 113
0
votes
2 answers
NSURLConnection. How do I grab just HTTP header information?
NSURLRequest + NSHTTPURLResponse is clearly the way to role. How do I just grab the header info?

dugla
- 12,774
- 26
- 88
- 136
0
votes
1 answer
ios - making a remote call works on emulator but can not get it to work from live devices
I have a bit of a confusing situation. I have a form after which I create a url and make an asynchronous server call. That data does not need to be secure.
Here is what I have:
NSString *urlString =…

GeekedOut
- 16,905
- 37
- 107
- 185
0
votes
1 answer
Downloading File using AFHTTPRequest Operating isn't working?
This is the code I'm using (from this Stack Overflow question, although it's slightly modified):
NSLog(@"Saving File...");
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[detailDataSourceDict…

1789040
- 569
- 2
- 6
- 17
0
votes
1 answer
NSURLRequest Know the URL Type if it is file or link
I have used a UIWebView in my app and want to download the file.
I have referred to this SO question
I wanted to know if there is a way to know if the NSURLRequest is a normal link or is it a link to download a file.
Regards,
Nirav

Nirav
- 315
- 1
- 4
- 16
0
votes
2 answers
Can I add a UIImage, with the same name, to a NSMutableArray every time method is called?
I'm using the AFNetworking API and I'm using the AFImageRequestOperation function to call a Image URL from a server API to convert that into a UIImage. What I want to do is; every time I call this method:
NSURLRequest *requestImage = [NSURLRequest…

Ollie177
- 315
- 1
- 3
- 17
0
votes
1 answer
Using objective-c to get coldfusion generated JSON
By going to a url test.com/test.cfm I am able to output the…

terezzy
- 243
- 1
- 3
- 8
0
votes
1 answer
NSURLConnection, Login then Post Image
I'm trying to upload a picture to my website from my iPhone, but I need to authenticate first.
My first attempt was to send an HTTP Post request with my login credentials using NSMutableURLRequest, and then sending the image in a similar fashion…

Jason
- 13,563
- 15
- 74
- 125
0
votes
1 answer
Multiple views with only one web connection?
I have 3 views that need to load web pages, I am doing the following
( with the associated connection and webview delegates ) in each of the views, is there a way to create a single source without duplicating the code in each view ?
Most solutions…

cmhdev
- 43
- 8
0
votes
1 answer
How to use local resources to speed up webview in iOS?
I'm loading a remote webpage into an iOS webview which relies on js and css assets. To improve the performance particularly on 3G networks, I'm hoping to call these assets from files local to the iOS device.
The website backing the iOS app is also…

Khan
- 423
- 4
- 9
0
votes
1 answer
I am getting Null response from php server
NSURL *URL = [NSURL URLWithString:@"http://"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
request.HTTPMethod = @"POST";
NSString *params = @"json=deepak";
NSData *data = [params…

Deepak
- 177
- 2
- 11
0
votes
1 answer
Why NSURL query doesn´t work
I hope someone can help me because I'm frustrating.
I can´t figure out why if I execute :
fileURL = [NSURL URLWithString:@"http://myweb.com/my.pdf"];
then I can display the file correctly in a QLpreviewController
but If I execute
fileURL = [NSURL…

user1312508
- 183
- 2
- 10