{"action":"opened","issue":{"url":"https://api.github.com/repos/daltoniam/SwiftHTTP/issues/157","labels_url":"https://api.github.com/repos/daltoniam/SwiftHTTP/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/daltoniam/SwiftHTTP/issues/157/comments","events_url":"https://api.github.com/repos/daltoniam/SwiftHTTP/issues/157/events","html_url":"https://github.com/daltoniam/SwiftHTTP/issues/157","id":106535314,"number":157,"title":"How to use ntlm with sharepoint","user":{"login":"mubashirjavaid","id":14292626,"avatar_url":"https://avatars.githubusercontent.com/u/14292626?v=3","gravatar_id":"","url":"https://api.github.com/users/mubashirjavaid","html_url":"https://github.com/mubashirjavaid","followers_url":"https://api.github.com/users/mubashirjavaid/followers","following_url":"https://api.github.com/users/mubashirjavaid/following{/other_user}","gists_url":"https://api.github.com/users/mubashirjavaid/gists{/gist_id}","starred_url":"https://api.github.com/users/mubashirjavaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mubashirjavaid/subscriptions","organizations_url":"https://api.github.com/users/mubashirjavaid/orgs","repos_url":"https://api.github.com/users/mubashirjavaid/repos","events_url":"https://api.github.com/users/mubashirjavaid/events{/privacy}","received_events_url":"https://api.github.com/users/mubashirjavaid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-15T11:22:27Z","updated_at":"2015-09-15T11:22:27Z","closed_at":null,"body":"As I am trying to access Sharepoint 2013 REST api through this swifthttp. My sharepoint rest service is under SSL and using ntlm.\r\nI provided URL and authentication by following code as under\r\ndo {\r\n    let opt = try HTTP.GET(\"https://domain.com\", parameters: nil)\r\n    //the auth closures will continually be called until a successful auth or rejection\r\n    var attempted = false\r\n    opt.auth = { challenge in\r\n        if !attempted {\r\n            attempted = true\r\n            return NSURLCredential(user: \"user\", password: \"passwd\", persistence: .ForSession)\r\n        }\r\n        return nil //auth failed, nil causes the request to be properly cancelled.\r\n    }\r\n    opt.start { response in\r\n    //do stuff\r\n    }\r\n} catch let error {\r\n    print(\"got an error creating the request: \\(error)\")\r\n}\r\n\r\nThe point is that how we can get response here. "}}