You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-23Lines changed: 24 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,19 +41,6 @@ This plugin registers a global object located at `cordova.plugin.http`.
41
41
42
42
Check the [Ionic docs](https://ionicframework.com/docs/native/http/) for how to use this plugin with Ionic-native.
43
43
44
-
### With AngularJS (Deprecated)
45
-
46
-
:warning:*This feature is deprecated and will be removed anytime soon.*:warning:
47
-
48
-
This plugin creates a cordovaHTTP service inside of a cordovaHTTP module. You must load the module when you create your app's module.
49
-
50
-
```js
51
-
var app =angular.module('myApp', ['ngRoute', 'ngAnimate', 'cordovaHTTP']);
52
-
```
53
-
54
-
You can then inject the cordovaHTTP service into your controllers. The functions can then be used identically to the examples shown below except that instead of accepting success and failure callback functions, each function returns a promise. For more information on promises in AngularJS read the [AngularJS docs](http://docs.angularjs.org/api/ng/service/$q). For more info on promises in general check out this article on [html5rocks](http://www.html5rocks.com/en/tutorials/es6/promises/). Make sure that you load cordova.js or phonegap.js after AngularJS is loaded.
These functions all take success and error callbacks as their last 2 arguments.
143
130
144
-
### enableSSLPinning
145
-
Enable or disable SSL pinning. This defaults to false.
131
+
### setSSLCertMode<aname="setSSLCertMode"></a>
132
+
Set SSL Cert handling mode, being one of the following values:
133
+
134
+
*`default`: default SSL cert handling using system's CA certs
135
+
*`nocheck`: disable SSL cert checking, trusting all certs (meant to be used only for testing purposes)
136
+
*`pinned`: trust only provided certs
146
137
147
138
To use SSL pinning you must include at least one .cer SSL certificate in your app project. You can pin to your server certificate or to one of the issuing CA certificates. For ios include your certificate in the root level of your bundle (just add the .cer file to your project/target at the root level). For android include your certificate in your project's platforms/android/assets folder. In both cases all .cer files found will be loaded automatically. If you only have a .pem certificate see this [stackoverflow answer](http://stackoverflow.com/a/16583429/3182729). You want to convert it to a DER encoded certificate with a .cer extension.
148
139
149
140
As an alternative, you can store your .cer files in the www/certificates folder.
0 commit comments