GitHub user cameronr opened a pull request:

    https://github.com/apache/thrift/pull/251

    add support for running under Browserify

    Add option for setting the desired XHR responseType.
    
    When running the http client under Browserify, the data provided in the 
callback will be a string or a Uint8Array ArrayBuffer. Wrap both of those in a 
Buffer so ``data[i].copy`` can succeed.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cameronr/thrift master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/251.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #251
    
----
commit 5b87cea8b385ed20426b519c6b98c2c0ca38a57d
Author: Cameron Ring <[email protected]>
Date:   2014-11-02T09:17:49Z

    Add support for Browserify
    
    When running under Browserify, response.on('data') may be called with a
    string or an array buffer (not just with a Buffer). Wrap those types in
    a buffer so that response.on('end') is able to process the data
    correctly.

commit 02cca3ce903f4ab7012e4aa67a11264d542f5790
Author: Cameron Ring <[email protected]>
Date:   2014-11-02T09:25:38Z

    Add support for setting responseType
    
    It's convenient to be able to set the expected response type for the
    XHR, particularly when receiving binary data.

commit 079a1f44179655331743b96f5f8b3f42f0801365
Author: Cameron Ring <[email protected]>
Date:   2014-11-02T09:32:41Z

    update comment about Browserify and types

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to