var request = require('../index');

request({
		host: 'google.com',
		method: 'GET',
		path: '/search',
		query: {
			q: 'nodejs'
		},
		headers: {
			'x-foo-bar' : "Hello World"
		},
		timeout: 3000
	})
	.then(function(data) {
		console.log(data);
		return Promise.resolve('Bingo');
	}, function(err) {
		console.log(err);
		return Promise.reject('Oh no!');
	})
	.then(function(data) {
		console.log(data);
	}, function(err) {
		console.log(err);
	});


@@ -205,36 +205,35 @@
 %09.then(function(
-data
+res
 ) %7B%0A%09%09console.lo
@@ -234,22 +234,69 @@
 ole.log(
-data);
+res.headers); // the property of http.IncomingMessage
 %0A%09%09retur
@@ -418,20 +418,19 @@
 unction(
-data
+res
 ) %7B%0A%09%09co
@@ -443,14 +443,54 @@
 log(
+res.
 data);
+ // the json data from remote server
 %0A%09%7D,
@@ -530,10 +530,8 @@
 r);%0A
+
 %09%7D);
-%0A%0A

change the test case