0.2.1 • Published 8 years ago
gulp-http-put v0.2.1
gulp-http-put
Makes an HTTP PUT for each file on the selected URL. I allows to define custon options that will be passed to request module.
Features
- Custom PUT params via request module
- Support callback method
- Raises error when failing
Installation
$ npm install gulp-http-put --save-dev
Examples
- Put with custom options and callback
var put = require("gulp-http-put");
gulp.task("put",function(){
gulp.src("src/**/*.js")
.pipe(put("http://www.mysite.com/",
{
"headers": {
"Custom-Header": "This is a custom HTTP header"
},
"callback": function(err, response, body) {
if(!err) {
//yor code
}
}
}
));
});
Options Format
Options used by request module. For example:
- options.callback Callback function called with
error
,response
,body
params. - options.headers Headers added to the request HTTP PUT message