I am new to swift code.I am getting the following error while i am passing my api to NSMutableRequest.What will be my mistake in this.My code is
my urlString is http://185.43.139.198/N********e/mer***se?wt=json&c=Chennai&s=ddrrss
let urlRequest = NSURLRequest(URL: NSURL(string: urlString)!)
and am getting the log console as
fatal error: unexpectedly found nil while unwrapping an Optional value
If Your
Url
Contain Spaces than it will Return NilTry This: