@calipsa/browser-request
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

@calipsa/browser-request

NPM version Downloads Dependency status Dev Dependency status

Installation

# using npm:
npm install --save @calipsa/browser-request

# or if you like yarn:
yarn add @calipsa/browser-request

Usage

import getRequests from '@calipsa/browser-request'

const req = getRequests('https://foobar.com', (response) => {
  if (!response.ok) {
    throw new Error(`Request failed: ${response.status}`)
  }
})

req.get('/posts', {
  offset: 100,
  limit: 50,
}).then(json => {
  console.log(json)
})

// ...

Readme

Keywords

Package Sidebar

Install

npm i @calipsa/browser-request

Weekly Downloads

52

Version

0.1.4

License

ISC

Unpacked Size

21.6 kB

Total Files

26

Last publish

Collaborators

  • balaphp
  • inker
  • usama.ashraf