tomas/needle — pull request #12 by surmind (2012-08-12 05:50:03+00:00)
Title: encode part.value to 'binary' in multipart post

Otherwise, unicode character will be unrecognizable in server side.

Client code sample:

var data = {};
data.content = '中文';
needle.post(SERVER_URL, data, {multipart: true});

Charactor display in server:

-�

Fix outside needle:

var data = {};
var content = '中文';
data.content = new Binary(content, 'utf-8').toString('binary');
needle.post(SERVER, data, {multipart: true});

In javascript, string is 'utf-8' by default, so I think it's better to fix this in needle as in my commits