2.1.0 • Published 7 years ago

@datafire/http v2.1.0

Weekly downloads
10
License
MIT
Repository
github
Last release
7 years ago

@datafire/http

Client library for HTTP

Installation and Usage

npm install --save @datafire/http
let http = require('@datafire/http').create();

http.request(null).then(data => {
  console.log(data);
});

Description

Make HTTP calls

Actions

request

Make an HTTP request

http.request(null, context)

Input

Output

get

http.get({
  "url": ""
}, context)

Input

Output

put

http.put(null, context)

Input

Output

post

http.post(null, context)

Input

Output

patch

http.patch(null, context)

Input

Output

delete

http.delete({
  "url": ""
}, context)

Input

Output

options

http.options({
  "url": ""
}, context)

Input

Output

head

http.head({
  "url": ""
}, context)

Input

Output

Definitions

Response

  • Response object
    • statusCode integer
    • headers object
    • body string

Request

  • Request object
    • url required string
    • query object
    • headers object

BodyRequest

  • BodyRequest object
    • body string
    • url required string
    • query object
    • headers object

MethodRequest

  • MethodRequest object
    • method required string
    • body string
    • url required string
    • query object
    • headers object