项目作者: rzkbrian

项目描述 :
Dart HTTP Mutual Authentication
高级语言: Dart
项目地址: git://github.com/rzkbrian/HttpMutualAuthentication.git
创建时间: 2019-05-23T20:45:36Z
项目社区:https://github.com/rzkbrian/HttpMutualAuthentication

开源协议:BSD 3-Clause "New" or "Revised" License

下载


Http Mutual Authentication

Using

Optional params: password and pathCertificate

  1. /// Init HttpAuth with HttpAuthBuilder
  2. /// sets [authPass] and [pathCertificate] for request
  3. HttpAuth httpAuth = new HttpAuthBuilder(
  4. authPass: "password", pathCertificate: "assets/certificate.p12")
  5. .build;
  6. /// Replace your url
  7. httpAuth.getRequest("http://www.google.com").then((result){
  8. /// Parse response with HttpAuth.parseBody -> String
  9. HttpAuth.parseBody(result).then((resultString){
  10. print("Results: $resultString");
  11. });
  12. });