Skip to content

Commit

Permalink
Added content-type header when adding to Pocket
Browse files Browse the repository at this point in the history
To fix issue neal#6 preventing Pocket integration from working
properly. This adds the fix identified by @ydyu see:

neal#6 (comment)
  • Loading branch information
llewelld committed Mar 21, 2016
1 parent b2be38b commit bd7dd49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Readebble.addToPocket = function() {
if (!Readebble.pocket.access_token) return Pebble.showSimpleNotificationOnPebble('Readebble', 'No Pocket account found. Please log in to your Pocket account via the Pebble mobile app.');
var url = 'https://ineal.me/pebble/readebble/pocket/add';
var data = { access_token: Readebble.pocket.access_token, url: Readebble.currentHeadline.link };
http('POST', url, serialize(data), null, function (e) {
http('POST', url, serialize(data), {"Content-Type": "application/x-www-form-urlencoded"}, function (e) {
var res = JSON.parse(e.responseText);
debugLog(res);
if (res.item && res.status == 1) {
Expand Down

0 comments on commit bd7dd49

Please # to comment.