Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@ function request(options, callback) {
if(typeof options.uri != "string")
throw new Error("options.uri must be a string");

var unsupported_options = ['proxy', '_redirectsFollowed', 'maxRedirects', 'followRedirect']
var unsupported_options = ['proxy', '_redirectsFollowed', 'maxRedirects']
for (var i = 0; i < unsupported_options.length; i++)
if(options[ unsupported_options[i] ])
throw new Error("options." + unsupported_options[i] + " is not supported")

if ('followRedirect' in options && !options.followRedirect)
throw new Error("options.followRedirect == false is not supported")

options.callback = callback
options.method = options.method || 'GET';
options.headers = options.headers || {};
Expand Down