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
6
votes
2 answers
NSURLSessionTaskPriority seems to be ignored?
In this example I kick off 100 NSURLSessionDataTask at default priority but then set the last one to high priority. However it seems to have no effect at all as the last task still ends up running last.
NSURLSession *session = ...
NSURLRequest…

trapper
- 11,716
- 7
- 38
- 82
6
votes
2 answers
NSURLSessionConfiguration HTTPAdditionalHeaders not set
Authorization header is set in NSURLSessionConfiguration, however it is not attached to NSURLSessionDataTask. Is this a bug in Foundation framework?
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration…

Armands Antans
- 478
- 4
- 13
6
votes
1 answer
How to use NSURLRequest / NSURLConnection to download an mp3 file to app?
The Situation
In my app, I am currently downloading an mp3 file (to docs directory) using [NSData dataWithContentsOfURL:URL], a method that works fine, but ties down the CPU, dissallowing screen updates of download status. So, I want to download…

RexOnRoids
- 14,002
- 33
- 96
- 136
6
votes
4 answers
iOS: passing custom NSURL to NSURLProtocol
I need to pass some extra informations along with UIWebView loadRequest: so that it reaches my implementation of NSURLProtocol. The information cannot be bound to NSURLRequest because the information must be retained with NSURLRequest…

Pavel Zdenek
- 7,146
- 1
- 23
- 38
6
votes
1 answer
lock screen interrupts NSURLConnection
I'd like to know what's happening behind the scenes when the user locks and unlocks the iPad screen. I have an app that downloads files using NSURLConnection and the downloads fail with a SOAP error ("A server with the specified hostname could not…

EarlGrey
- 2,514
- 4
- 34
- 63
6
votes
2 answers
Playing a video from live stream while also saving the stream to disk on iOS
I've been looking into this topic for a while now and I can't really figure out how I could achieve this. Let's say we have a video from an HTTP Stream and I want to be able to play that video in my app, and at the same time the video is also…

bompf
- 1,374
- 1
- 18
- 24
6
votes
2 answers
How to query the last modification date of a file via HTTP on the iPhone using NSHTTPURLResponse?
In my iPhone application I need to query the last modification date of an internet .m4a file via HTTP, but I DON'T want to downloading it.
I'm reading Apple's documentation about NSURLRequest and NSHTTPURLResponse, but it seems to be all related to…

neowinston
- 7,584
- 10
- 52
- 83
5
votes
2 answers
iOS: Is it possible to open NSURLRequest directly in Safari?
I'm not talking about a UIWebView, I want to open the mobile safari app using an NSURLRequest.
Why? In my app, the user has already logged into our web server. I want to give the user the option of launching the webpage without having to reenter…

mtmurdock
- 12,756
- 21
- 65
- 108
5
votes
2 answers
How to get a complete request from a NSURLRequest?
Is there any way to get the actual data that will be sent when a NSURLConnection sends a NSURLRequest? Right now I'm mainly interested in looking at HTTP and HTTPS requests, but since NSURLRequest works for many protocols, it seems like there ought…

Caleb
- 124,013
- 19
- 183
- 272
5
votes
3 answers
Multiple async webservice requests NSURLConnection iOS
I have a problem that Im not sure how to tackle. I can without any problem make requests to the REST service when passing a single request.
My problem now is at based on that respons i get some values including ID´s. All ID´s retrieved will then…

Silversnail
- 386
- 1
- 6
- 23
5
votes
3 answers
How to Get NSURLResponse
I make http request to the web server with this:
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString: @"http://server.com"]];
[request setHTTPMethod: @"POST"];
[request setHTTPBody: myRequestData];
[request…

nyanev
- 11,299
- 6
- 47
- 76
5
votes
2 answers
UIWebView won't load links with certificate (https:// prefix)
I know this has been asked before but I have looked at every answer (there aren't many) and none help me.
The issue I am running into is dealing with certificates with my schools e-mail service. The links for the two e-mail services are here:
Main…

RyanG
- 4,393
- 2
- 39
- 64
5
votes
3 answers
HTTPS POST from iPhone using NSURLConnection hangs for certain filesize range
I'm using NSURLConnection to make an async HTTPS POST to our webservice to upload a jpg. It works fine most of the time.
But when the post body is between 196609 and 196868 bytes (inclusive), the connection hangs after the file has been uploaded…

tom
- 81
- 1
- 5
5
votes
1 answer
Data not sent from a background via 3G
I have an application which sends data to the server while app is in the background. Here is the code responsible for data sending:
-(bool) sendStats: (MCStatsSender*) val{
if(![self checkInternet]){ //Using Reachability here
return…

Whirlwind
- 14,286
- 11
- 68
- 157
5
votes
1 answer
Passing Cyrillic characters as a URL parameter
I need to pass Cyrillic characters as a parameter in a URL in my iPhone app. A sample URL looks like:
http://www.mysite.com/script.php?message=страшная
When I use this URL in my browser, it returns the correct result. However, in my app, the…

user472938
- 128
- 2
- 6