JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q38233F
  • License Apache-2.0

A simple REST client.

Package Exports

  • @michaelcoxon/rest-client

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@michaelcoxon/rest-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rest-client

A simple REST client

Installation

The library is available on NPM...

npm -i @michaelcoxon/rest-client

101

The only implementation at the moment is for in-browser XMLHttpRequest.

use it like this...

import { XhrHttpClient } from '@michaelcoxon/rest-client'

const client = new XhrHttpClient();
const url = 'https://example.com/api/get-data';
const result = await client.getObjectAsync(url);