0.3.0 • Published 4 years ago

integreat-adapter-form v0.3.0

Weekly downloads
6
License
ISC
Repository
github
Last release
4 years ago

application/x-www-form-urlencoded adapter for Integreat

Adapter that lets Integreat send and receive content in application/x-www-form-urlencoded encoding.

npm Version Build Status Coverage Status Maintainability

Getting started

Prerequisits

Requires node v10 and Integreat v0.7.

Installing and using

Install from npm:

npm install integreat-adapter-form

Example of use:

const integreat = require('integreat')
const formAdapter = require('integreat-adapter-form')
const defs = require('./config')

const resources = integreat.resources(formAdapter)
const great = integreat(defs, resources)

// ... and then dispatch actions as usual

Example source configuration:

{
  id: 'store',
  adapter: 'form',
  endpoints: [
    { options: { uri: 'https://api.com/accepting/form' } }
  ]
}

Data will be sent with application/x-www-form-urlencoded encoding as described in the W3C Forms specification](https://www.w3.org/TR/html401/interact/forms.html#didx-applicationx-www-form-urlencoded).

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.