Skip to content
This repository was archived by the owner on Aug 20, 2020. It is now read-only.

Commit 20b5194

Browse files
Version Bump v2.2.1: Sending email with accents
1 parent 2ab5938 commit 20b5194

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
33

44
This project adheres to [Semantic Versioning](http://semver.org/).
55

6+
## [2.2.1] - 2016-06-15
7+
### Fixed
8+
- Sending email with accents: https://github.com/sendgrid/sendgrid-nodejs/issues/239
9+
- Thanks [eaparango](https://github.com/eaparango)!
10+
611
## [2.2.0] - 2016-06-10
712
### Added
813
- Automatically add Content-Type: application/json when there is a request body

lib/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function Client (globalRequest) {
7373
// add the request body's content length
7474
if (!isEmpty(endpointRequest.body)) {
7575
body = JSON.stringify(endpointRequest.body)
76-
request.headers['Content-Length'] = body.length
76+
request.headers['Content-Length'] = Buffer.byteLength(body)
7777
request.headers['Content-Type'] = 'application/json'
7878
}
7979

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
],
66
"name": "sendgrid-rest",
77
"description": "HTTP REST client, simplified for Node.js.",
8-
"version": "2.2.0",
8+
"version": "2.2.1",
99
"homepage": "https://sendgrid.com",
1010
"repository": {
1111
"type": "git",

0 commit comments

Comments
 (0)