Skip to content

Commit bc5465c

Browse files
committed
Added support for setting HTTP headers for the request. Defaults to {}
1 parent 03644f6 commit bc5465c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tasks/http_upload.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module.exports = function(grunt) {
2121
// Merge task-specific and/or target-specific options with these defaults.
2222
var options = this.options({
2323
method: 'POST',
24+
headers: {},
2425
url: ''
2526
});
2627

@@ -52,6 +53,7 @@ module.exports = function(grunt) {
5253
// HTTP request
5354
rest.request(options.url, {
5455
method: options.method,
56+
headers: options.headers,
5557
multipart: true,
5658
data: reqData
5759
}).on('complete', function(data, response) {

0 commit comments

Comments
 (0)