Advertisement
Guest User

Untitled

a guest
Aug 4th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. let space = NSURLProtectionSpace(host: "110.110.110.110",
  2. port: 9000, protocol: "http",
  3. realm: "110.110.110.110",
  4. authenticationMethod: NSURLAuthenticationMethodHTTPBasic)
  5.  
  6. let cre = NSURLCredential(user: "someSome",
  7. password: "someSome",
  8. persistence: .ForSession)
  9.  
  10. Manager.sharedInstance.session.configuration.URLCredentialStorage?.setCredential(
  11. cre,
  12. forProtectionSpace: space)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement