Skip to content

Commit

Permalink
Allow options.url, people do it all the time, might as well just supp…
Browse files Browse the repository at this point in the history
…ort it.
  • Loading branch information
mikeal committed Jan 21, 2011
1 parent 41efb7a commit 9549570
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ var toBase64 = function(str) {
};

function request (options, callback) {
if (options.url) {
// People use this property instead all the time so why not just support it.
options.uri = options.url;
delete options.url;
}

if (!options.uri) {
throw new Error("options.uri is a required argument")
} else {
Expand Down

0 comments on commit 9549570

Please sign in to comment.