Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

Commit

Permalink
add Accept-Charset header and update version and agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett Gerry committed Oct 29, 2013
1 parent 979fa70 commit d029e65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/classes/TwilioRestClient.cls
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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)));
Expand Down

0 comments on commit d029e65

Please sign in to comment.