Papupata Documentation

API Reference

requestPromiseAdapter

import createRequestAdapter from 'papupata/adapters/requestPromise'

Purpose

An adapter that utilizes request-promise to invoke APIs

The adapter is not properly documented, and is not of all that high quality as it is and it makes various non-general assumptions. It should serve to give you some ideas on how a proper fetch adapter might be implemented, though.

Examples

Older styles are still supported in later versions, just not preferred.
const API = new APIDeclaration()
API.configure({
  baseURL: '',
  requestAdapter: createRequestAdapter('json')
})