mozilla/socialapi-demo — pull request #35 by tOkeshu (2013-01-15 16:11:30+00:00)
Title: Fix xhr content-types.

Express.js expects a Content-Type to know how to parse the body.
By default jQuery send application/x-www-form-urlencoded transforming boolean
values into strings. So for instance false becomes "false".
When the payload comes back via the eventsource channel, testing the boolean
value will systematically succeed.

The fix adds the proper json content type (i.e. application/json) and encodes
the data vie JSON.stringify.