Questions tagged [nsurlrequest]

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.

1095 questions
3
votes
1 answer

Intercepting spawned URL requests from UIWebView

I'm trying to cache specified web pages to disk by NSURLProtocol,now I can only get the first URL request, but the UIWebView spawns further URL requests for loading graphics. So how can I Intercept all the requests spawned by UIWebView from the…
Suge
  • 2,808
  • 3
  • 48
  • 79
3
votes
1 answer

Get SSL certificate info - UIWebview

How can i get the certificate info? I'm using Uiwebview and need to get the certificate information for some reason , I can't find way to do this .. Thanks :)
Rivka Schwartz
  • 524
  • 5
  • 15
3
votes
1 answer

How can I interact with a server in ObjectiveC without receiving a wrong response?

This is my first question here :) I really need help with some servers and PHP stuff. Here's the question: I have a NSMutableURLRequest that interacts with a php file like this: NSInteger userID = 4; NSString * logInString = [NSString…
David Roman
  • 2,548
  • 2
  • 16
  • 16
3
votes
1 answer

Cookies not sent with NSMutableURLRequest

Firstly, the app would open a UIWebView to a login page on my website, upon successful log in, the webview will be closed. There's a url I need to request which would return a very small json data. If I were to launch this url with a webview, the…
3
votes
1 answer

Programmatically press html button from NSURLRequest

I have a html form which when it loads is already populated with data. It has Save and Apply buttons on. I want to change 1 item on the form and POST it from my iOS app. The problem is that when I send the POST with my changed Form Data info for…
Darren
  • 10,182
  • 20
  • 95
  • 162
3
votes
1 answer

ios6 cachedResponseForRequest blocks sendSynchronousRequest

This does not occur in Xcode 4.4, but with 4.5, using ios6 simulator or real device, the call to sendSynchronousRequest does not return until timeout if called from within cachedResponseForRequest. Likewise, a loop that uses…
3
votes
2 answers

NSURLCacheStorageNotAllowed still caching

I have a JSON file on S3 I'm downloading over HTTP with an NSURLConnection. I set the connection to use a caching policy of NSURLCacheStorageNotAllowed but I was still seeing an old version of the data come back. I changed to…
Rog
  • 17,070
  • 9
  • 50
  • 73
3
votes
0 answers

iPhone network requests are not working sometimes

In my app I'm using MKNetworkKit to make requests to my server and also make direct calls to Facebook using Facebook SDK. Sometimes (once in a few days) I get an odd issue: all network requests from my app stop working (both to my server and…
andr111
  • 2,982
  • 11
  • 35
  • 45
3
votes
1 answer

Modify headers in NSHTTPURLResponse

Is it possible to modify a header on a NSHTTPURLResponse without using the method initWithURL:statusCode:HTTPVersion:headerFields: to create a new customized NSHTTPURLResponse
3
votes
0 answers

No "Set-Cookie" Header in NSURLResponse

When I do a request for http://www.google.com from iOS and look over the returned headers by getting them like so: NSDictionary *dictionary = [response allHeaderFields]; I don't see "Set-Cookie" in there. While when I am using a different Client,…
Jakob
  • 1,126
  • 3
  • 16
  • 38
3
votes
2 answers

Maximum timeOut for NSMutableRequest & NSURLConnection

What is the maximum timeout interval I can use in my application. I m using following method. (id)initWithURL:(NSURL *)URL cachePolicy:(NSURLRequestCachePolicy)cachePolicy timeoutInterval:(NSTimeInterval)timeoutInterval; I m using GET…
JiteshW
  • 2,195
  • 4
  • 32
  • 61
3
votes
3 answers

How to intercept redirection from a NSURLRequest without UIWebview

I have a method that created a NSURLRequest. If I load this NSURLRequest in a UIWebView, there are some redirections that I catch with - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request…
Anthony
  • 2,801
  • 3
  • 30
  • 49
3
votes
1 answer

Converting a cURL request (with --data-urlencode) into AFNetworking GET request

This issue might not be related to AFNetworking specifically, but more in constructing an NSURLRequest. I am trying to issue the falling GET request using AFNetworking- curl -X GET \ -H "X-Parse-Application-Id:…
Devang
  • 1,531
  • 3
  • 22
  • 38
3
votes
1 answer

NSURLConnection sometimes truncates the body of an NSMutableURLRequest

I have an app on the appStore that syncs xml data to a webservice. I've had two error reports today caused by the xml document ending prematurely. One ended right in the middle of an xml tag, so I know it isn't a problem caused by special…
bgolson
  • 3,460
  • 5
  • 24
  • 41
2
votes
2 answers

IOS JSON escaping special characters

I'm working in IOS and trying to pass some content to a web server via an NSURLRequest. On the server I have a PHP script setup to accept the request string and convert it into an JSON object using the Zend_JSON framework. The issue I am having is…
miken.mkndev
  • 1,821
  • 3
  • 25
  • 39