johngeorgewright/grunt-http — pull request #3 by kozmic (2013-11-19 07:19:42+00:00)
Title: Add support for grunt options to reuse config across targets

I need to set the same options for multiple targets, and want to avoid duplicating my settings (only write it once). Grunt has this functionality built in in "this.options" (documentation: [http://gruntjs.com/api/inside-tasks), and most grunt plugins use this to configure tasks and targets. This PR switches to this.options for configuration.

I have updated the example in the readme.

Example of configuration with two targets using commons options:
```
http: {
options: {
method: "PUT",
rejectUnauthorized: false,
auth: {
'user': grunt.option('username'),
'pass': grunt.option('pass')
}
},
js: {
options: {
sourceFile: "my.js",
url: "http://myserver/my.js"
}
},
css: {
options: {
sourceFile: "my.css",
url: "http://myserver/my.css"
}
}
}
```

Tasks that only have one target can either have the 'options' in 'http' or in the target (as above).

Since this PR changes how task and targets are configured, it should probably not be a bugfix in version number (and maybe add a "warning" in readme about the change in how tasks/targets are configured?).