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
4
votes
1 answer
AFNetworking - does its HTTP request send with cookies by default?
I am trying to debug a http get request i sent via AFNetworking's AFJSONRequestOperation to see if the cookies are being sent correctly. However, i dont see any cookies in http header. Can some expert help me out here? thanks! :)

trillions
- 3,669
- 10
- 40
- 59
4
votes
3 answers
Some requests time out with no clear reason
I encountered a bug I can't understand and for now it happens only on a specific device. It happens on an iPhone 5 with iOS 6 but unfortunately I don't have access to another one to check if it's related to the fact that it's an iPhone 5.
The…

Moxy
- 4,162
- 2
- 30
- 49
4
votes
1 answer
Nested NSDictionary & NSArray with AFNetworking not working properly
NSDictionary *customerDictionary = [NSDictionary dictionaryWithObjectsAndKeys:@"blah@blah.com", @"email", @"1", @"facebook", nil];
NSArray *customerArray = [NSArray arrayWithObjects:customerDictionary, nil];
NSDictionary *parameters = [NSDictionary…

ninjaneer
- 6,951
- 8
- 60
- 104
4
votes
1 answer
UIWebview didReceiveAuthenticationChallenge
I'm using webview to load a web site. and I managed to run the apps.
But my problem Is that I can't load the web site if I pass a wrong password, it only show a white screen.
If I pass the correct username/password, it will load the web site.
is…

Alfred Angkasa
- 1,381
- 3
- 17
- 35
4
votes
3 answers
Detect if PNG file is corrupted in Objective C
I'm downloading jpgs and pngs using NSURLRequest. This works ok but sometimes the files are corrupted.
I have seen Catching error: Corrupt JPEG data: premature end of data segment and have this working for jpgs.
Does anyone know of a way to do the…

Chris Jones
- 41
- 2
3
votes
3 answers
iOS HTTP Request called twice
I have a function which makes GET request to the server. It works fine but for some reason it's called twice. I call function when a button is pressed.
This is function code:
-(void) GETasync: (NSString *) path{
receivedData = [[NSMutableData…

Ilya Blokh
- 11,923
- 11
- 52
- 84
3
votes
1 answer
NSURLRequest using HTTPS
I'm converting a bunch of ASI connection requests with the NSURLConnection and NSURLRequest classes from apple.
one of the issues is that the post request has to use https.. but I'm not sure if this is possible with NSURLRequest, this is currently…

C.Johns
- 10,185
- 20
- 102
- 156
3
votes
5 answers
NSURLConnection not responding
I'm trying to get some data from an URL, but for some reason, nothing happens when I do the following. Neither didReceiveResponse:, didReceiveData:, didFailWithError: or connectionDidFinishLoading: are reached, except when I add a timeout to my…

ChrisTauziet
- 179
- 4
- 13
3
votes
1 answer
IOS 5.0 - NSURLConnection works but returns Null before completing
I have a class file called functions where I keep repetitive tasks. One of the functions in there is called GetPrice which connects to an XML web service, parses the XML and returns a CarPrice object. Everything works great until it's time to…

user1205315
- 47
- 1
- 7
3
votes
2 answers
AFNetworking Error Domain=NSPOSIXErrorDomain Code=12 "The operation couldn’t be completed. Cannot allocate memory
I'm sending a lot of image files via AfNetworking to a Rails server. On edge and sometimes 3G I get this error: Error Domain=NSPOSIXErrorDomain Code=12 "The operation couldn’t be completed. Cannot allocate memory".
This is the code I'm using to send…

MB.
- 4,167
- 8
- 52
- 79
3
votes
1 answer
How to use authentication token in NSURLRequest
I'm using a service with REST API, which provides me an authentication token as the response for the sign in POST request.
Now for authentication on every request i need to send that token with the request.
How to use this token with every request i…

viral
- 4,168
- 5
- 43
- 68
3
votes
2 answers
How to trap custom URL scheme from a webview?
In my application, I have a webview which loads up a page that contains both normal links and custom URL schemes, such as myapp://id=1234.
Right now, I am trying to trap the request within this function:
- (BOOL)webView:(UIWebView *)webView…

kurisukun
- 3,149
- 5
- 37
- 69
3
votes
1 answer
how to know when NSURLRequest finish loading
Im implementing an app that shows some Twitter data, when is working on wifi is ok, but on 3g crashes, I have come to the conclusion that is because the NSURLRequest that fetchs the data that populates the table takes longer to load so the table…

manuelBetancurt
- 15,428
- 33
- 118
- 216
3
votes
3 answers
extract data from cocoa http get request
I implemented the following code:
NSURL *url = [ NSURL URLWithString:[ NSString stringWithFormat: @"http://www.google.com/search?q=%@", query ] ];
NSURLRequest *request = [ NSURLRequest requestWithURL: url ];
I want to extract the body from what I…

Atma
- 29,141
- 56
- 198
- 299
3
votes
1 answer
NSURLRequest hanging SpringBoard
I have a MobileSubstrate addon that hooks springboard (not in the actual objective c code, but with the plist). It contains a UIWebView, which loads a NSURLRequest. This NSURLRequest is here:
NSString *urlAddress = @"http://www.google.com";
NSURL…

Eman yalpsid
- 511
- 1
- 5
- 8