Skip to content

brodriro/HttpMutualAuthentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Http Mutual Authentication

Using

Optional params: password and pathCertificate

  /// Init HttpAuth with HttpAuthBuilder
  /// sets [authPass] and [pathCertificate] for request
  HttpAuth httpAuth = new HttpAuthBuilder(
          authPass: "password", pathCertificate: "assets/certificate.p12")
      .build;

  /// Replace your url
  httpAuth.getRequest("http://www.google.com").then((result){
    /// Parse response with HttpAuth.parseBody -> String
    HttpAuth.parseBody(result).then((resultString){
      print("Results: $resultString");
    });
  });