From 752250a16b7971b3f908ed58109dc9c3ca293e7f Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 22 Feb 2015 22:11:43 +0100 Subject: [PATCH] v1.0.3: Documentation fix --- README.md | 3 +++ lib/bhttp.coffee | 1 + package.json | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f4f519..a90493d 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ Be aware that by making a pull request, you agree to release your modifications A simple example: ```javascript +var Promise = require("bluebird"); var bhttp = require("bhttp"); Promise.try(function() { @@ -73,6 +74,7 @@ bhttp.get("http://icanhazip.com/", {}, function(err, response) { Demonstrating both streaming responses and using a stream in form data for a request: ```javascript +var Promise = require("bluebird"); var bhttp = require("bhttp"); Promise.try(function() { @@ -107,6 +109,7 @@ bhttp.get("http://somesite.com/bigfile.mp4", {stream: true}, function(err, respo ### Sessions ```javascript +var Promise = require("bluebird"); var bhttp = require("bhttp"); var session = bhttp.session({ headers: {"user-agent": "MyCustomUserAgent/2.0"} }); diff --git a/lib/bhttp.coffee b/lib/bhttp.coffee index fef232a..a783e7c 100644 --- a/lib/bhttp.coffee +++ b/lib/bhttp.coffee @@ -1,6 +1,7 @@ # FIXME: Force-lowercase user-supplied headers before merging them into the request? # FIXME: Deep-merge query-string arguments between URL and argument? # FIXME: Named arrays for multipart/form-data? +# FIXME: Are arrays of streams in `data` correctly recognized as being streams? # Core modules urlUtil = require "url" diff --git a/package.json b/package.json index efe70fa..5bf26e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bhttp", - "version": "1.0.2", + "version": "1.0.3", "description": "A sane HTTP client library for Node.js with Streams2 support.", "main": "index.js", "scripts": {