Skip to content

Commit f691d09

Browse files
author
Sefa Ilkimen
committed
update docu and change log
1 parent b68cbcd commit f691d09

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.10.0
4+
5+
- Feature #34: add new serializer "utf8" sending utf-8 encoded plain text (thanks robertocapuano)
6+
37
## 1.9.1
48

59
- Fixed #45: does not encode arrays correctly as HTTP GET parameter on Android

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ This sets up all future requests to use Basic HTTP authentication with the given
6363
cordova.plugin.http.useBasicAuth('user', 'password');
6464
```
6565

66-
### setHeader
66+
### setHeader<a name="setHeader"></a>
6767
Set a header for all future requests to a specified host. Takes a hostname, a header and a value (must be a string value).
6868

6969
```js
@@ -101,11 +101,14 @@ Set the data serializer which will be used for all future PATCH, POST and PUT re
101101
cordova.plugin.http.setDataSerializer('urlencoded');
102102
```
103103

104-
You can choose one of these two:
104+
You can choose one of these:
105105
* `urlencoded`: send data as url encoded content in body (content type "application/x-www-form-urlencoded")
106106
* `json`: send data as JSON encoded content in body (content type "application/json")
107+
* `utf8`: send data as plain UTF8 encoded string in body (content type "plain/text")
107108

108-
Caution: `urlencoded` does not support serializing deep structures whereas `json` does.
109+
You can also override the default content type headers by specifying your own headers (see [setHeader](#setHeader)).
110+
111+
__Caution__: `urlencoded` does not support serializing deep structures whereas `json` does.
109112

110113
### setRequestTimeout
111114
Set how long to wait for a request to respond, in seconds.

www/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var pluginId = module.id.slice(0, module.id.lastIndexOf('.'));
22
var cookieHandler = require(pluginId + '.cookie-handler');
33
var messages = require(pluginId + '.messages');
44

5-
var validSerializers = ['urlencoded', 'json', 'utf8' ];
5+
var validSerializers = [ 'urlencoded', 'json', 'utf8' ];
66

77
module.exports = {
88
b64EncodeUnicode: b64EncodeUnicode,

0 commit comments

Comments
 (0)