Papupata Documentation

API Reference

fetchAdapter

import fetchAdapter from 'papupata/adapters/fetch

Purpose

An adapter that utilizes fetch to invoke APIs

The adapter is not 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: fetchAdapter
})