From d029e65ffe4c88a48152c0967c48c2dd620f57e8 Mon Sep 17 00:00:00 2001 From: Brett Gerry Date: Tue, 29 Oct 2013 11:29:26 -0700 Subject: [PATCH] add Accept-Charset header and update version and agent --- src/classes/TwilioRestClient.cls | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/classes/TwilioRestClient.cls b/src/classes/TwilioRestClient.cls index dc7a5c3..6ddf2a0 100644 --- a/src/classes/TwilioRestClient.cls +++ b/src/classes/TwilioRestClient.cls @@ -28,7 +28,7 @@ OTHER DEALINGS IN THE SOFTWARE. public class TwilioRestClient { /** The Constant VERSION. */ - private static final String VERSION = '3.0'; + private static final String VERSION = '3.1.0'; /** The endpoint. */ private String endpoint = 'https://api.twilio.com'; @@ -524,8 +524,9 @@ public class TwilioRestClient { HttpRequest request = buildMethod(method, path, params); request.setHeader('X-Twilio-Client', 'salesforce-' + VERSION); - request.setHeader('User-Agent', 'twilio-salesforce-' + VERSION); + request.setHeader('User-Agent', 'twilio-salesforce/' + VERSION); request.setHeader('Accept', 'application/json'); + request.setHeader('Accept-Charset', 'utf-8'); request.setHeader('Authorization', 'Basic '+EncodingUtil.base64Encode(Blob.valueOf(this.accountSid + ':' + this.authToken)));