I have a valid url and am getting an invalid url error. Can someone tell me why?
As you can see, there is http: //
// http://fr.radiovaticana.va/news/2015/02/01/le_pape_fran%C3%A7ois_%C3%A0_sarajevo_le_6_juin_prochain/1121065 Error description=Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo=0x78f97920 {NSUnderlyingError=0x79f78bd0 "unsupported URL", NSLocalizedDescription=unsupported URL}
This is how I tried to initialize the URL:
Method 1:
NSString * path=@ "http://fr.radiovaticana.va/news/2015/02/01/le_pape_françois_à_sarajevo_le_6_juin_prochain/1121065"; NSURL *url=[NSURL URLWithString:path]; NSMutableURLRequest * request =[NSMutableURLRequest requestWithURL:url];
Method 2:
NSMutableURLRequest * request =[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://fr.radiovaticana.va/news/2015/02/01/le_pape_françois_à_sarajevo_le_6_juin_prochain/1121065"]];
Nicole sd
source share