New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

boxfishcurl

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boxfishcurl

Curl library for the boxfish ads platform

latest
Source
npmnpm
Version
1.1.7
Version published
Maintainers
1
Created
Source

BoxfishCurl.js

Installation

npm install boxfishcurl

Using simple Request

###Usage

// GET
curl.get('http://google.com').then([Function], [Function]);
// POST
curl.post('http://your-post-url', params).then([Function], [Function]);
// PUT
curl.put('http://your-PUT-url', params).then([Function], [Function]);
// DELETE
curl.delete('http://your-DELETE-url', params).then([Function], [Function]);

default properties

you can set any request options here, including any header you may need.

curl.init({ headers: { 'Content-Type' : 'application/json' } });

Using HTTP and HTTPS modules

###Usage

ParamtypeRequiredDefault
hoststringtrue-
pathstringtrue-
portstring80
methodstring'GET'
headersobject-
datastring'application/x-www-form-urlencoded'
curl
	.req({
    host    : 'boxfish.com',
    path    : '/',
    headers : { 'Content-Type': 'application/json' },
    method  : 'POST',
    data    : {
        field       : 'this can be any JSON',
        used        : 'this will be sent in the request body',
        required    : false
    }
  }).then(function(response) {
    // you got your data back
  }, function(err) {
    // something went wrong
  });

Run test

npm test

Keywords

curl

FAQs

Package last updated on 17 Feb 2016

Did you know?

Socket

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