Skip to content

Commit ffe68f3

Browse files
author
Sefa Ilkimen
committed
update README (missing url property in callback signature)
1 parent 2263950 commit ffe68f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ cordova.plugin.http.sendRequest('https://google.com/', options, function(respons
228228
Execute a POST request. Takes a URL, data, and headers.
229229

230230
#### success
231-
The success function receives a response object with 3 properties: status, data, and headers. **status** is the HTTP response code as numeric value. **data** is the response from the server as a string. **headers** is an object with the headers. The keys of the returned object are the header names and the values are the respective header values. All header names are lowercase.
231+
The success function receives a response object with 4 properties: status, data, url, and headers. **status** is the HTTP response code as numeric value. **data** is the response from the server as a string. **url** is the final URL obtained after any redirects as a string. **headers** is an object with the headers. The keys of the returned object are the header names and the values are the respective header values. All header names are lowercase.
232232

233233
Here's a quick example:
234234

@@ -268,7 +268,7 @@ cordova.plugin.http.post('https://google.com/', {
268268
```
269269

270270
#### failure
271-
The error function receives a response object with 3 properties: status, error and headers. **status** is the HTTP response code as numeric value. **error** is the error response from the server as a string. **headers** is an object with the headers. The keys of the returned object are the header names and the values are the respective header values. All header names are lowercase.
271+
The error function receives a response object with 4 properties: status, error, url, and headers (url and headers being optional). **status** is the HTTP response code as numeric value. **error** is the error response from the server as a string. **url** is the final URL obtained after any redirects as a string. **headers** is an object with the headers. The keys of the returned object are the header names and the values are the respective header values. All header names are lowercase.
272272

273273
Here's a quick example:
274274

0 commit comments

Comments
 (0)