v0.5.0
azury's fetch client
Attributes
Includes Deno configuration
Repository
Current version released
3 years ago
fetch
Setup
npm i @azury/fetchUsage
import fetch from '@azury/fetch'
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