1.3.0 • Published 3 months ago

integreat-transporter-http v1.3.0

Weekly downloads
5
License
ISC
Repository
-
Last release
3 months ago

HTTP transport for Integreat

Transporter that lets Integreat send and receive data over http/https.

Getting started

Prerequisits

Requires node v10 and Integreat v0.8.

Installing and using

Install from npm:

npm install integreat-transport-http

Example of use:

const integreat = require('integreat')
const httpAdapter = require('integreat-transport-http')
const defs = require('./config')

const resources = integreat.mergeResources(integreat.resources(), {
  transporters: { http: httpAdapter() },
})
const great = integreat(defs, resources)

// ... and then dispatch actions as usual

Example source configuration:

{
  id: 'store',
  transporter: 'http',
  endpoints: [
    { options: { uri: 'https://api.com/api' } }
  ]
}

Data will be sent with content-type application/json.

An optional logger may be provided to the jsonAdapter() function, to log out the request sent to the service, and its response. The logger must be an object with an info() and an error() function. Both should accept a string message as first argument, and a meta object as the second.

Running the tests

The tests can be run with npm test.

Contributing

Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests.

License

This project is licensed under the ISC License - see the LICENSE file for details.

1.4.0-rc.1

3 months ago

1.4.0-rc.0

3 months ago

1.2.2

6 months ago

1.3.0

6 months ago

1.2.1

8 months ago

1.2.0

10 months ago

1.0.0

10 months ago

0.3.0

10 months ago

0.1.1

11 months ago

1.1.0-rc.1

10 months ago

1.1.0-rc.0

10 months ago

1.1.1

10 months ago

1.1.0

10 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.1.0

1 year ago

0.1.0-beta.7

1 year ago

0.1.0-alpha.27

1 year ago

0.1.0-alpha.28

1 year ago

0.1.0-beta.3

1 year ago

0.1.0-beta.2

1 year ago

0.1.0-beta.5

1 year ago

0.1.0-beta.4

1 year ago

0.1.0-beta.6

1 year ago

0.1.0-beta.1

2 years ago

0.1.0-beta.0

2 years ago

0.1.0-alpha.26

2 years ago

0.1.0-alpha.25

2 years ago

0.1.0-alpha.24

2 years ago

0.1.0-alpha.18

2 years ago

0.1.0-alpha.17

2 years ago

0.1.0-alpha.19

2 years ago

0.1.0-alpha.21

2 years ago

0.1.0-alpha.20

2 years ago

0.1.0-alpha.23

2 years ago

0.1.0-alpha.22

2 years ago

0.1.0-alpha.16

2 years ago

0.1.0-alpha.10

2 years ago

0.1.0-alpha.12

2 years ago

0.1.0-alpha.11

2 years ago

0.1.0-alpha.14

2 years ago

0.1.0-alpha.13

2 years ago

0.1.0-alpha.9

2 years ago

0.1.0-alpha.15

2 years ago

0.1.0-alpha.8

3 years ago

0.1.0-alpha.7

3 years ago

0.1.0-alpha.6

3 years ago

0.1.0-alpha.5

3 years ago

0.1.0-alpha.4

4 years ago

0.1.0-alpha.3

4 years ago

0.1.0-alpha.2

4 years ago

0.1.0-alpha.1

4 years ago