@azury/fetch
TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

fetch

Setup

Deno

import fetch from 'https://deno.land/x/fetch_client@v0.6.0/mod.ts'

Node.js

npm i @azury/fetch
import fetch from '@azury/fetch'

Usage

const client = new fetch()

// optionally, you can specify global headers and a base path
const client = new fetch({
  base: 'https://',
  headers: {
    authorization: 'bearer token'
  }
})

const { data, error, code, ... } = await client.get('example.com', { type: 'json' }) // fetches 'https://example.com' and parses the response body as json

Readme

Keywords

none

Package Sidebar

Install

npm i @azury/fetch

Weekly Downloads

0

Version

0.7.0

License

Apache-2.0

Unpacked Size

20.3 kB

Total Files

5

Last publish

Collaborators

  • boywithkeyboard