CmisSync.Lib.Cmis.PersistentStandardAuthenticationProvider.HandleResponse C# (CSharp) Méthode

HandleResponse() public méthode

Handles the HttpWebResponse by extracting the cookies.
public HandleResponse ( object connection ) : void
connection object Connection instance of the response
Résultat void
        public override void HandleResponse(object connection) {
            HttpWebResponse response = connection as HttpWebResponse;
            if (response != null) {
                // AtomPub and browser binding authentication
                this.Cookies.Add(response.Cookies);
            }
        }

Usage Example

 public void DoNotFailOnNonHTTPResponse() {
     using (var auth = new PersistentStandardAuthenticationProvider(this.storage.Object, this.url)) {
         auth.HandleResponse(new Mock<WebResponse>().Object);
     }
 }