0

I am using NSURLComponents like so:

let urlComponents = NSURLComponents(string: "https://example.com/api/");
urlComponents?.user = "username";
urlComponents?.password = "p@ssword";

Which gives me the URL:

https://username:p%40ssword@example.com/api/

and this does not work with my api which needs NTML Auth. When I use a password that does not have special characters it does work.

Is there away to get around this?

user979331
  • 11,039
  • 73
  • 223
  • 418

0 Answers0