Socket
Socket
Sign inDemoInstall

gulp-http-post

Package Overview
Dependencies
101
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gulp-http-post

Post buffer to current url on pipe, and handle http responses


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Install size
4.49 MB
Created
Weekly downloads
 

Readme

Source

gulp-http-post

froked from zhso/gulp-post

NPMNPM

npm npm npm npm

bitHound Overall Score Inline docs Build Status Coverage Status

GitHub stars GitHub watchers

Post buffer to current url on pipe.

var post = require("gulp-http-post");

gulp.task("post",function(){
    gulp.src("src/**/*.js")
        .pipe(post("http://www.mysite.com/"))
        .pipe(gulp.dest("dist"));
});

Features

  • Custom post params
  • Support buffer encoding
  • Support current callback
  • Callback gets body string and full http response object as params

Installation

$ npm i gulp-http-post

Examples

  • Custom Options
var post = new require("gulp-http-post");

gulp.task("build",function(){
    var options = {
                encoding: "base64",
                callback: function (err, body, response) {
                    if(err){
                        console.error(err);
                    }else{
                        console.log(body);
                        console.log(response);
                    }
                },
                param1: "value1",
                param2: "value2"
                //...
    };
    gulp.src("src/**/*.js")
        .pipe(post("http://www.mysite.com/",options))
        .pipe(gulp.dest("dist"));
})

Options Format

  • options.content file content
  • options.encoding buffer.toString() encoding
  • options.relative file relative

Keywords

FAQs

Last updated on 31 Aug 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc