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
8
votes
4 answers
Bad URL when requesting with NSURL
I'm trying to request this kind of URL in iPhone 4.0 SDK (access token slightly modified because you don't really need to see…

Enrico Susatyo
- 19,372
- 18
- 95
- 156
8
votes
1 answer
Swift 3: URLSession / URLRequest Not Working
I am still trying to convert our application from Swift 2 over to Swift 3 because I am being forced to since all of our Apple devices are now running iOS 10.
I have gone through the code conversion and thought I was doing well however, while…

recoilnetworks
- 488
- 2
- 6
- 21
8
votes
1 answer
XTubeManager crash in background?
I am experiencing a large amount of crashes in the XTubeManager (seems to be CFNetwork internal). Unfortunately the console logs are not available, only the call stack (see below).
Questions:
I could imagine that my app crashes in the background,…

MarkHim
- 5,686
- 5
- 32
- 64
8
votes
1 answer
NSURLConnection, NSURLRequest, untrusted cert and user authentication
Morning Everyone,
I've been attempting to write an application that does some GETs from a remote Web Service that requires authentication. My main problem is that the majority of these remote servers (and there are a lot of them) don't have valid…

Staros
- 3,232
- 6
- 30
- 41
8
votes
1 answer
NSURLRequest lost HTTP header “Authorization” while redirecting the request
We have a problem with downloading files from the server in background mode. The HTTP header “Authorization” field is lost while redirecting the request to another server.
We made some experiments and noticed that other fields (even the same but…

gN0Me
- 437
- 1
- 6
- 17
8
votes
4 answers
iOS any body knows how to add a proxy to NSURLRequest?
I'm setting up a webview but I need to load the content of the webview using a proxy. Any of you knows how can I'm implement the proxy in NSURLRequest?
for example:
NSString *location=@"http://google.com";
NSURL *url=[NSURL…

HelenaM
- 1,807
- 6
- 30
- 41
8
votes
2 answers
NSURLConnection and multiple asynchronous requests - is it messing with the data being transmitted?
I have an NSArray of links. I want to parse through them with an online article extractor API (Clear Read), and with the result given back for each article (some HTML) I throw it into an NSString.
My problem arises from the fact that, say my array…

user212541
- 1,878
- 1
- 21
- 30
8
votes
6 answers
iOS Twitter NSURLErrorDomain Code=-1012
I am trying to get the user's contact details by singning up with twitter in my app. I found this project on github which seems really good. I encounter only one problem. If I run it with my new app consumer secret and consumer key codes from…

Teo
- 3,394
- 11
- 43
- 73
8
votes
3 answers
What's the default cache expiration time for NSURLRequests?
I'm using a NSURLRequest to check for available data updates. Today I noticed, that NSURLRequest caches the request by default. Even after several hours no new request was sent to the server. Now I'm wondering what the default behavior of this cache…

henrik
- 708
- 7
- 14
7
votes
1 answer
nsurlconnection asynchronous request
First of all the questions are failry simiple.. if you just want to see what they are skip to the bottom of this post and you will see them in bold.. for more detail then you can read the rest of this post...
I am just trying to iron out my…

C.Johns
- 10,185
- 20
- 102
- 156
7
votes
4 answers
How to remove headers in a NSMutableURLRequest?
How can I make a request that contains no headers fields? The requests are being sent to my own server implementation from scratch, which doesn't care about header fields. The request will at most contain only a post body. Let me know if I'm missing…

Gurpartap Singh
- 2,744
- 1
- 26
- 30
7
votes
2 answers
How to send HTTP body plain text for GET method?
I had a problem, I use the iGDB REST API which need to send some plain text for some endpoints with GET method.
There is no problem with PostMan (by selecting "Body" > "raw" & paste my query), but when I try with Objective-C, an error appear telling…

iStornZ
- 603
- 1
- 8
- 19
7
votes
2 answers
NSURLConnection on iOS 9 does not use HTTP/2 protocol
I've configured HTTP/2 on a Jetty 9.3 server, it has a valid certificate and SSLLabs.com given it a grade A security configuration.
Browsing using Chrome to https://example.com loads the correct response, it's also reporting that "h2" (HTTP/2")…

Kof
- 23,893
- 9
- 56
- 81
6
votes
1 answer
Swift - Convert URLRequest to cURL
How to convert URL Request to cURL?
I know there are plugins available in Alamofire / Moya.
But I'm using native code.
Here is how I'm generating URLRequest.
var urlRequest = URLRequest(url: url) // URL is a param herel
var newHeaders: [String:…

sagarkothari
- 24,520
- 50
- 165
- 235
6
votes
2 answers
What is the difference between NSURLRequest and URLRequest in Swift?
I'm looking through some swift documents and I see that NSURLRequest and URLRequest are practically the same, with the added tidbit that NSURLRequest is used:
when you need reference semantics or other Foundation-specific behavior.
Is one faster…

Jevon Cowell
- 411
- 1
- 3
- 13