Support binary response bodies in _performSecureRequest #133

evanp opened this Issue Mar 11, 2013 · 0 comments


None yet
1 participant

evanp commented Mar 11, 2013

The response handler in _performSecureRequest forces the data returned to a string. The data variable is initialized to an empty string, and then each chunk of data is appended with +=.

It would be nice to do some detection on the Content-Type and for known binary types (image/, audio/, video/* at least) use a Buffer object instead.

@evanp evanp added a commit to evanp/node-oauth that referenced this issue Mar 11, 2013

@evanp evanp Support binary response bodies in _performSecureRequest
Change the response handling in _performSecureRequest so it can handle
binary data types in the response body. If it detects a response with
a content-type that looks binary (by default, image/*, audio/*, and
video/* types), it stores the body in a Buffer rather than an UTF-8

Closes #133.

@SamDecrock SamDecrock added a commit to SamDecrock/node-oauth that referenced this issue Apr 10, 2014

@SamDecrock SamDecrock added binary support, fixes #133 6a4ef5a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment