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
2
votes
3 answers

iPhone SDK: Get a Forwarded URL

I have a url from an rss feed that when viewed in a browser, redirects to the full url which contains id's that I need in the app. Is there a way in an app that I can take the simplified url that comes from the feed (i.e. www.somesite.com/Thing1)…
Matt
  • 2,920
  • 6
  • 23
  • 33
2
votes
1 answer

How to send a URL request as 'Referer'

I have an app which existed as an iPhone app first and now as an Android app. One of the functions is to load a web page which bypasses the security login by passing a string as Referer. The code for the iPhone is as follows - NSMutableURLRequest…
user616076
  • 3,907
  • 8
  • 38
  • 64
2
votes
3 answers

webViewDidStartLoad Request URL Not Set to URL Being Loaded

I am working on a browser that has back and forward buttons, that when tapped, should immediately display the URL of the page being loaded. Currently I do something like [webView goBack]; and then implement the delegate UIWebView method: -…
Stunner
  • 12,025
  • 12
  • 86
  • 145
2
votes
2 answers

Updating UIImageView inside UIScrollView - image freezes on scroll

I have UIImageView inside UIScrollView. UIImageView displays image which is constantly downloaded from the internet (stream opened by using NSURLConnection). NSString surl = @"some valid url"; NSURL* nsurl = [NSURL URLWithString:surl]; NSURLRequest…
solgar
  • 4,312
  • 2
  • 26
  • 30
2
votes
1 answer

NSMutableURLRequest and NSURLConnection can't work in GCD dispatch_async?

I put a NSMutableURLRequest request in dispatch_async but it doesn't work. However, NSURLRequest works. Code: dispatch_queue_t queue1 = dispatch_get_global_queue(0, 0); dispatch_async(queue1, ^{ NSMutableURLRequest* request =…
2
votes
1 answer

Check Internet before loading Plist for tableview from server

I am using Storyboard with a Navigation Controller and prepareforsegue. I have two UITableViews. If you click on a row in the first table you get to the second table. The second table picks its data from a plist depending which row you clicked in…
halloway4b
  • 573
  • 1
  • 11
  • 23
2
votes
1 answer

How to authenticate using sendSynchronous request in NSURLConnection

Can any one tell me how to send a authentication request using the NSURLConnection.I tried out the following code snippet by following the link stackoverflow question but still its not working. I want to authenticate using synchronous request and…
prajul
  • 1,216
  • 2
  • 15
  • 27
2
votes
1 answer

alternative of expectedContentLength of NSURLResponse

As Apple documentation says expectedContentLength of NSURLResponse may not return the value, if the protocol implementations does not report the content length as part of the response. So, is there any alternative to that, like executing javascript…
san
  • 3,350
  • 1
  • 28
  • 40
2
votes
1 answer

how to send post request with nsurlconnection

I have changed over to NSURLConnection and NSURLRequest delegates for my db connections etc. I was using the ASIHTTPRequest libraries to do all this stuff but finally decided to move on due to the lack of support for that 3rd party library. what I…
C.Johns
  • 10,185
  • 20
  • 102
  • 156
2
votes
2 answers

UIWebView doesn't show keyboard when focusing on text field on the second load

I have a really weird problem with a UIWebView. I'm using it to login users to several services, I open the UIWebView, show a HTML login page, and pressing one of the textfields opens up the keyboard, as it should. Afterwards, If i try loading a…
Shai Mishali
  • 9,224
  • 4
  • 56
  • 83
2
votes
1 answer

NSURLRequest directory listing parse

I create an NSURLRequest and an NSURLConnection object and collect data in an NSMutableData instance. I then create an NSString from the downloaded data and get the directory listing of an ftp server that looks something like this: drwx--x--x 13…
stringCode
  • 2,274
  • 1
  • 23
  • 32
2
votes
2 answers

How to send NSURL request containig @ in the username

How can i send a url request containing a @ character in the username ? Currently my url request code looks as follows : NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://user@exam.com:pwd@example.com"]]; The…
prajul
  • 1,216
  • 2
  • 15
  • 27
2
votes
1 answer

How can i port .net's HttpWebRequest to iOs's URLRequest

How can i port the following .net HttpWebRequest to objective-c? I have been given code snippets from a colleague for a POST request in .net to a certain server, and was required to implement the same in iOs. Should i just use NSMutableURLRequest…
RabinDev
  • 658
  • 3
  • 13
2
votes
3 answers

How to send request with XML

I want to send XML file to http://api.online-convert.com/queue-insert I'm using such code: NSString *urlString = [NSString stringWithFormat:@"http://api.online-convert.com/queue-insert"]; NSMutableURLRequest *request = [[[NSMutableURLRequest alloc]…
LightNight
  • 1,616
  • 6
  • 30
  • 59
2
votes
2 answers

Timed out error for NSUrlRequest

When I open the app from background I need to hit server to get some data. When I'm doing so I am getting an alert as follows: "Request timed out" (nserror's localised description) I'm on wifi and my internet as well as my server are fine. This is…