@scbd/load-http

1.0.0 • Public • Published

sidebarDepth: 2

Load HTTP

Description

A wrapper for for ky-universal that will dynamically auto install polyfills wear needed.

Install

yarn add @scbd/load-http

#OR 

npm install @scbd/load-http

API

get$http

import { get$http } from '@scbd/load-http'

async function getData(){
  const $http   = await get$http()
  const action = await $http.get('https://api.cbd.int/api/v2019/actions/5cda8a5f3e27a60001320d27').then((res) => res.json())

  consola.info(action)
  return action
}

toURLSearchParams({/* object of search params*/})

returns new URLSearchParams() based on object passed. Stringifying nested objects and Date objects.

Readme

Keywords

none

Package Sidebar

Install

npm i @scbd/load-http

Weekly Downloads

5

Version

1.0.0

License

MIT

Unpacked Size

1.21 MB

Total Files

49

Last publish

Collaborators

  • sbilodeau
  • vincegopez
  • blaisefonseca
  • randyhoulahan