@mainframe/transport-http-browser

HTTP transport for browser.

Usage no npm install needed!

<script type="module">
  import mainframeTransportHttpBrowser from 'https://cdn.skypack.dev/@mainframe/transport-http-browser';
</script>

README

transport-http-browser

HTTP transport for browser.

Installation

yarn add @mainframe/transport-http-browser

Usage

import httpTransport from '@mainframe/transport-http-browser'

const transport = httpTransport('http://localhost')

transport.request({ hello: 'transport' }).then(console.log)

API

httpTransport()

Arguments

  1. url: string

Returns (data: Object) => Promise<any>

License

MIT