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
3
votes
0 answers
Using NSURLCache to display data quickly, update in background
I'd like my iOS application (at least certain endpoints) to have the following network behavior:
Always use the cache, whenever it's available, no matter the age (draw the UI right away)
If the data is stale, also make a network request (the UI has…

SimplGy
- 20,079
- 15
- 107
- 144
3
votes
3 answers
Remove HTTP headers in NSMutableURLRequest
I need to send request to my server without http headers with NSMutableURLRequest and NSMutableURLConnection. I found this to remove content of header [request setValue:@"" forHTTPHeaderField:@"User-Agent"];, but I need to delete all…

Vlad
- 1,541
- 1
- 21
- 27
3
votes
0 answers
How to solve NSErrorFailingURLStringKey in iOS?
I am new to iOS. I am developing an application which retrieves data from a server using the HTTP POST method.
I pass an NSDictionary as POST parameters with my URL.
NSDictionary format is like this:
{
"draw_id" = 6;
"block_numers" = {
…

nishitpatel
- 652
- 4
- 9
- 25
3
votes
3 answers
How to add lowercase field to NSURLRequest header field?
I'm getting pretty frustrated figuring out how to add a lowercase header field to an NSMutableURLRequest.
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:MyURLString]];
[urlRequest setValue:@"aValue"…

Drewsmits
- 1,384
- 2
- 14
- 24
3
votes
2 answers
NSURLSession - control the transfer rate
I want to control how many bits are transferred per second. Is it possible to do this? For example, can I set a rate somewhere so that my files get downloaded at 2 kbps?
I've looked through the documentation and there doesn't seem to be anything,…

arcticmatt
- 1,956
- 1
- 19
- 36
3
votes
2 answers
NSUrlRequest from curl for stripe
I need to make a http post request using the following instructions:
curl https://api.stripe.com/v1/tokens \
-u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
-d "bank_account[country]=US" \
-d "bank_account[routing_number]=110000000" \
-d…

Mehdi
- 772
- 7
- 16
3
votes
1 answer
UIWebView - what NSError's are thrown?
I'm trying to throw up an alert to users when a UIWebView fails to load a page because it can't reach the server. I'm using the delegate method:
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
// show NSAlert telling…

Sam Heather
- 1,493
- 3
- 19
- 42
3
votes
1 answer
Crash with "Symbol not found: _OBJC_CLASS_$_NSMutableURLRequest"
I have installed my app from Xcode 5.1.1 in debug mode on iPad 3 with iOS 7.1.1, as show below in crash log. In day of installing app was working fine. I was not using my iPad for 2 days and today it just crashes on Splash screen, at first second.…

Volodymyr B.
- 3,369
- 2
- 30
- 48
3
votes
2 answers
Authentication Error with GitHub API on iOS
I am working with GitHub's REST API for iOS and am having trouble getting it to work correctly with basic authentication. I have written the following code to view a users GitHub repositories:
NSString *requestString = [NSString…

user2604504
- 697
- 2
- 14
- 29
3
votes
4 answers
Issue in sending POST parameter from iOS
I want to send imageUrl in POST parameter which can have &.e.g. imageUrl can be http://www.url.com?param1=edfef¶m2=erfregreg.
Now If I send this directly to server then it will not consider any params after &. Other answers on SO suggest to…

Geek
- 8,280
- 17
- 73
- 137
3
votes
2 answers
What is the difference between NSURLRequest's mainDocumentURL and URL properties?
I've built a web browser for iOS and I'm trying to pull the URL to display in an address bar.
I look at the NSURLRequest in the webView:shouldStartLoadWithRequest:navigationType: and the webViewDidFinishLoad: UIWebView delegate methods.
Should I…

Austin
- 4,638
- 7
- 41
- 60
3
votes
2 answers
Which schemes does NSURL / NSURLRequest / NSURLConnection understand?
Apple says, NSURL is developed using RFC 1738 (and some others).
Now RFC 1738 specifies only that an web URL has a scheme and a scheme specific part.
I want to know all the schemes which NSURL understands. And because I use it with NSURLRequest and…

openfrog
- 40,201
- 65
- 225
- 373
3
votes
4 answers
Mutable NSHTTPURLResponse or NSURLResponse
I need to modify response headers in an NSURLResponse. Is this possible?

Arlen Anderson
- 2,486
- 2
- 25
- 36
3
votes
2 answers
How to check if a file exists at particular URL?
How do I check if a file exists on a web site? I am using NSURLConnection with my NSURLRequest and an NSMutableData object to store what comes back in the didReceiveData: delegate method. In the connectionDidFinishingLoading: method I then save…

Magic Bullet Dave
- 9,006
- 10
- 51
- 81
3
votes
4 answers
iOS store-and-forward framework for offline HTTP POST requests
Is there a way (presumably a library?) to store HTTP POST requests when the user is offline, and then transmit the POST requests when the user is back online?
(I don't need to read the server's response, except insofar as I'll want to re-queue the…

Dan Fabulich
- 37,506
- 41
- 139
- 175