v0.2.2Published 9 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.


Adds the features proposed in this PR. Add this to your project along with the core http package.


In a Meteor app directory, enter:

$ meteor add http aldeed:http


The API methods are the same as in the core HTTP package.

This package adds a responseType option to on both the client and the server. It also adds an encoding option on the server.

The responseType option can be one of the following string values:

  • "string": result.content will be a String (this is the default and matches the current behavior)
  • "blob": (Client only) result.content will be a Blob
  • "document": (Client only) result.content will be a Document
  • "buffer": (Server only) result.content will be a Buffer (setting encoding to null does the same thing)
  • "arraybuffer": result.content will be an ArrayBuffer
  • "ejson-binary": result.content will be an EJSON.binary
  • "json": result.content will be an Object

On the server only, you may additionally specify the desired encoding with the encoding option when responseType is "string". This takes string values matching those from Node's Buffer.toString method.

License Note

The LICENSE covers my additions and changes. Much of the code is copied from Meteor's core http package.