0.1.0-alpha.13 • Published 6 months ago

mi-causa v0.1.0-alpha.13

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

mi-causa

Promise based Fetch wrapper.

Node js

const { createHttp } = require('mi-causa')

/** @type {import('mi-causa').Config} */
const config = {
  baseURL: 'https://dummyjson.com'
}

const http = createHttp(config)

http
  .get('/posts/1')
  .then((response) => response.json())
  .then((data) => {
    console.log(data)
  })

Typescript

import { createHttp, type Config } from 'mi-causa'

const config: Config = {
  baseURL: 'https://dummyjson.com/'
}

let api = createHttp(config)

api
  .get('/products')
  .then((data) => data.json())
  .then((data) => console.log(data))
0.1.0-alpha.10

6 months ago

0.1.0-alpha.12

6 months ago

0.1.0-alpha.11

6 months ago

0.1.0-alpha.13

6 months ago

0.1.0-alpha.9

6 months ago

0.1.0-alpha.8

6 months ago

0.1.0-alpha.5

6 months ago

0.1.0-alpha.7

6 months ago

0.1.0-alpha.6

6 months ago

0.1.0-alpha.4

1 year ago

0.1.0-alpha.2

1 year ago

0.1.0-alpha.1

1 year ago