Support `res.setEncoding` and non-text response types #21

Open
wmrowan opened this Issue Jul 22, 2013 · 6 comments

Projects

None yet

7 participants

@wmrowan
wmrowan commented Jul 22, 2013

Response data in http-browserify seems to default to text. In node http it seems to default to buffer. Independent of defaults, the node version supports setEncoding so you can change the type of the response. The browserify version should do the same.

@Jxck
Jxck commented Sep 9, 2014

+1
or support only setEncoding('utf8') and ignore others seems fine.

@tellnes
tellnes commented Sep 9, 2014

See #10

@MiguelCastillo

So, is there a plan to merge the PR?

@jamestalmage

Would there be any value to throwing or at least logging an error if it is not utf-8?

+1 either way.

@jamestalmage jamestalmage added a commit to jamestalmage/node-github that referenced this issue Jun 30, 2015
@jamestalmage jamestalmage make it work with browserify
The main issue preventing browserify usage was computed paths
in require statements: `require("./" + someVariable)`. Those have
all been eliminated.

This patch only adds browser support for `v3.0.0` (see the throwing
code in `/index.js` where it states exactly that to understand why).
Hint: it's related to computed paths again.

There were also a number of issues in `browserify-http`, and
`browserify-https` that I needed to code around to get things working:

  - substack/https-browserify#1
  - substack/http-browserify#90
  - substack/http-browserify#21
  - substack/http-browserify#10
055c559
@jstoeffler

+1

@drawm
drawm commented Sep 23, 2016

+1
Causes problem on other library.
baalexander/node-xmlrpc#135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment