Skip to content

Commit

Permalink
Added charset=utf-8 to the JSON content-type in the REQUEST() met…
Browse files Browse the repository at this point in the history
…hod.
  • Loading branch information
petersirka committed Jun 16, 2023
1 parent 41d0a61 commit 8e3bcb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
0.0.87
========================

- added `charset=utf-8` to the JSON content-type in the `REQUEST()` method

========================
0.0.86
========================
Expand Down
2 changes: 1 addition & 1 deletion utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ function _request(opt, callback) {
opt.headers[CT] = CT_OCTET;
break;
case 'json':
opt.headers[CT] = 'application/json';
opt.headers[CT] = 'application/json; charset=utf-8';
break;
case 'urlencoded':
opt.headers[CT] = 'application/x-www-form-urlencoded';
Expand Down

0 comments on commit 8e3bcb9

Please sign in to comment.