This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@firecamp/http-executor

0.0.3 • Public • Published

@firecamp/http-executor

Description

Execute rest api request

Prerequisite

Usage

const httpExecutor = require('@firecamp/http-executor');

let request = new httpExecutor(app_version, os_home_path, isElectron)

request
  .execute(request_config_object)
  .then(response => {
      console.log(response)
  })
  .catch(error => {
      console.log(error)
  })

Input

// request_config
{
    "url": "https://as:12@jsonplaceholder.typicode.com/posts",
    "method": "post",
    "headers": { 'Content-Type': 'application/json' },
    "params": {},
    "data": '{"msg":"Hi"}',
    "extra_config": {
        "ignore_response_content_length": false,
        "origin": "",
        "request_timeout": "",
        "user_agent": ""
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @firecamp/http-executor

Weekly Downloads

0

Version

0.0.3

License

UNLICENSED

Unpacked Size

244 kB

Total Files

5

Last publish

Collaborators

  • nishchit14