We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d15b86 commit 4a437f9Copy full SHA for 4a437f9
README.md
@@ -93,13 +93,6 @@ cordova.plugin.http.setHeader('www.example.com', 'Header', 'Value');
93
cordova.plugin.http.setHeader('www.example.com:8080', 'Header', 'Value');
94
```
95
96
-### disableRedirect
97
-If set to `true`, it won't follow redirects automatically. This is a global setting.
98
-
99
-```js
100
-cordova.plugin.http.disableRedirect(true);
101
-```
102
103
### setDataSerializer<a name="setDataSerializer"></a>
104
Set the data serializer which will be used for all future PATCH, POST and PUT requests. Takes a string representing the name of the serializer.
105
@@ -173,6 +166,17 @@ cordova.plugin.http.acceptAllCerts(true, function() {
173
166
});
174
167
175
168
169
+### disableRedirect
170
+If set to `true`, it won't follow redirects automatically. This defaults to false.
171
+
172
+```js
+cordova.plugin.http.disableRedirect(true, function() {
+ console.log('success!');
+}, function() {
176
+ console.log('error :(');
177
+});
178
+```
179
180
### validateDomainName
181
This function was removed in v1.6.2. Domain name validation is disabled automatically when you enable "acceptAllCerts".
182
www/advanced-http.js
@@ -68,13 +68,13 @@ var publicInterface = {
68
globalConfigs.timeout = timeout;
69
},
70
enableSSLPinning: function (enable, success, failure) {
71
- return exec(success, failure, 'CordovaHttpPlugin', 'enableSSLPinning', [enable]);
+ return exec(success, failure, 'CordovaHttpPlugin', 'enableSSLPinning', [ enable ]);
72
73
acceptAllCerts: function (allow, success, failure) {
74
- return exec(success, failure, 'CordovaHttpPlugin', 'acceptAllCerts', [allow]);
+ return exec(success, failure, 'CordovaHttpPlugin', 'acceptAllCerts', [ allow ]);
75
76
disableRedirect: function (disable, success, failure) {
77
- return exec(success, failure, 'CordovaHttpPlugin', 'disableRedirect', [disable]);
+ return exec(success, failure, 'CordovaHttpPlugin', 'disableRedirect', [ disable ]);
78
79
sendRequest: function (url, options, success, failure) {
80
helpers.handleMissingCallbacks(success, failure);
0 commit comments