gulp-http-post
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -11,3 +11,3 @@ "use strict"; | ||
* @example | ||
* gulp.src("folder").pipe(post("http://zhso.net/")); | ||
* gulp.src("folder").pipe(post("http://mysite.com/")); | ||
*/ | ||
@@ -32,3 +32,8 @@ module.exports = (url, options)=> { | ||
}, (err, response, body)=> { | ||
option.callback && option.callback(err, body, response); | ||
if(typeof option.callback === 'function') { | ||
var callbackResponse = option.callback(err, body, response); | ||
if(callbackResponse !== null || callbackResponse !== undefined) { | ||
throw new pluginError(PLUGIN_NAME, callbackResponse); | ||
} | ||
} | ||
if (err) { | ||
@@ -35,0 +40,0 @@ throw new pluginError(PLUGIN_NAME, err); |
{ | ||
"name": "gulp-http-post", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Post buffer to current url on pipe, and handle http responses", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
8459
96