Skip to content

No way to disable automated response parsing in node #824

Open
@cmawhorter

Description

@cmawhorter

I'm piping the response to a file and have no need to parse it. I'm trying to disable the automatic parsing entirely to avoid the perf. hit but running into some problems.

var request = require('superagent');
request.parse = {};

I thought that would work based on the documentation but it didn't. The reason seems to be because many parsers are hard-coded into the response handler.

This is a workaround but doesn't seem ideal.

// treats everything as binary
request.parse['application/x-www-form-urlencoded'] =
request.parse['application/json'] =
request.parse.text = request.parse.image;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions