danwrong / restler

REST client library for node.js
MIT License
1.99k stars 391 forks source link

Permit Buffer and binary string as options.data. #193

Closed mthx closed 5 years ago

mthx commented 9 years ago

Prior to this change Buffer was subjected to stringify as it matched the 'object' typeof test. binary string also ended up corrupt. This change ensures we're done with encoding by the time we write to the request and adds some tests that previously failed.

mthx commented 9 years ago

node.js is pretty new to me so let me know if I've missed anything obvious or made a mess. Thanks.

EricTheMagician commented 9 years ago

This fixes some of the issues I am having with posting files directly without wrapping it in a form first.

mthx commented 5 years ago

Closing my PR. Last change in this project was > 4 years ago so not likely to be merged and now has conflicts.