ssjs-fetch

1.0.0 • Public • Published

SSJS fetch

Simplified interface for Script.Util.HttpRequest.

Installation

npm install ssjs-fetch

Interface

Get: function (url, headers = [], continueOnError = true, retries = 0, emptyContentHandling = 0) 
Post: function (url, data, headers = [], continueOnError = true, retries = 0, emptyContentHandling = 0) 
Put: function(url, data, headers = [], continueOnError = true, retries = 0, emptyContentHandling = 0) 
Patch: function(url, data, headers = [], continueOnError = true, retries = 0, emptyContentHandling = 0) 
Delete: function (url, headers = [], continueOnError = true, retries = 0, emptyContentHandling = 0) 

Example

import $ from 'ssjs-fetch';
const result = $.Post('https://httpbin.org/post', {
    foo: 'bar'
});

/ssjs-fetch/

    Package Sidebar

    Install

    npm i ssjs-fetch

    Weekly Downloads

    1

    Version

    1.0.0

    License

    Apache-2.0

    Unpacked Size

    14.9 kB

    Total Files

    4

    Last publish

    Collaborators

    • philipdallmer