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
4
votes
1 answer

Monotouch + UIWebView = Random Crashes

I'm using the latest stable releases of Mono/Monotouch/MonoDevelop on a iOS 5.0 iPhone and iPad. I have a UIWebView that in the emulator never crashes however randomly on the actual devices it crashes on EXC_BAD_ACCESS. Based on everything I've…
4
votes
2 answers

NSDate to RFC 2822 Date format

Is there any efficient way to convert an NSDate to RFC 2822 Date format string ? I want to use this string to create an NSURLRequest and set the value of "If-Modified-Since" header field.
Soni
  • 454
  • 8
  • 23
4
votes
1 answer

Proxies with NSURLRequest

I'm using NSURLConnection and NSURLRequest to make a connection to a server for my OS X app. Now I would like to implement a specific proxy server connection but I cannot find something about it in the docs. I want the web view to go straight…
Nils Munch
  • 8,805
  • 11
  • 51
  • 103
4
votes
2 answers

Get POST parameter from NSURLRequest

Is it possible to retrieve the value of a POST parameter from a NSURLRequest in the method; -(BOOL) webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType Is so, how is…
Thizzer
  • 16,153
  • 28
  • 98
  • 139
4
votes
1 answer

Large image URL response not cached by URLSession: Why?

I use a URLSession data task to download several JPG images from a backend. As the images are rather large in size (~500 KB) I want to cache the respective responses until they have expired (i.e. they have exceeded their max-age). This is the code I…
Mischa
  • 15,816
  • 8
  • 59
  • 117
4
votes
2 answers

Reverse Engineer HTTP request

I intercepted an HTTP request on Charles originating from iPhone to Instagram and here are the headers POST /logging_client_events HTTP/1.1 Host: graph.instagram.com Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Connection:…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
4
votes
0 answers

Post Request in wkwebview using form submit does not work in some cases as no referrer headers sent out

I am performing Post Request in wkwebview by submitting a form works good when I try to login some social websites as described this question's answer, except Facebook mobile site. Facebook gives me the error message do no enter your password on…
Priyanka
  • 806
  • 1
  • 9
  • 21
4
votes
1 answer

In background NSURLSession why are secure cookies lost?

I'm developing an app that logs into a HTTPS website. After authentication, the website sends a final cookie that is marked as 'Secure'. The app works when I use defaultSessionConfiguration() for NSURLSession(). When I change one line in the app to…
andymc
  • 51
  • 7
4
votes
1 answer

NSURLRequest returns NSURLErrorNetworkConnectionLost but reachability says the network connection is on

In my app I'm downloading big video files in a row and sometimes my http request fails and reports that NSError code is -1005, which is NSURLErrorNetworkConnectionLost. I check internet connection through Reachability class and it says that its…
Andrey Chernukha
  • 21,488
  • 17
  • 97
  • 161
4
votes
2 answers

Adding headers to Alamofire request (with ephemeral session)

I'm trying to add headers into AlamoFire requests. It works well when I use the following code: let manager = Manager.sharedInstance manager.session.configuration.HTTPAdditionalHeaders = [ "Authorization": "Bearer \(accessToken!)" ] However,…
johnson23
  • 286
  • 2
  • 16
4
votes
3 answers

In iOS, how to read the multi part form data in the NSURLRequest originating from a WKWebView?

In our WKWebView, we have a multi part form POST request which we need to inspect and conditionally handle. Currently, we're trying this using the WKNavigationDelegate's webView:decidePolicyForNavigationAction:decisionHandler: method to gain access…
abc123
  • 8,043
  • 7
  • 49
  • 80
4
votes
3 answers

NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)

I am trying for an HTTP call on https. Here is my code snippet. NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL …
Ruchir Shah
  • 898
  • 3
  • 13
  • 31
4
votes
4 answers

NSURLConnection returning error instead of response for 401

I have a web API that, for a specific request returns status code 200 if everything went ok, and 401 if the user is not logged in based on an Authorization token. Everything works fine if the response status is 200, but doesn't seem to work properly…
Radu Vlad
  • 1,474
  • 2
  • 21
  • 37
4
votes
3 answers

Making a POST request to google form

I would like to make a POST request to a Google Form but I'm coming across page not found. I am following this guide on using on how to set up the POST request. I am using this Google Form:…
4
votes
1 answer

NSURLRequest not working on Yosemite Today Extension

I am trying to create a Yosemite Notification Center widget for my own personal use. It is supposed to grab a number from a server using NSURLRequest and NSURLConnection and display that number in a label. I have it working in a normal Objective-C…
Sega dude
  • 1,103
  • 3
  • 12
  • 29