0.1.0-alpha.13 • Published 1 year ago

mi-causa v0.1.0-alpha.13

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

0.1.0-alpha.12

1 year ago

0.1.0-alpha.11

1 year ago

0.1.0-alpha.13

1 year ago

0.1.0-alpha.9

1 year ago

0.1.0-alpha.8

1 year ago

0.1.0-alpha.5

1 year ago

0.1.0-alpha.7

1 year ago

0.1.0-alpha.6

1 year ago

0.1.0-alpha.4

2 years ago

0.1.0-alpha.2

2 years ago

0.1.0-alpha.1

2 years ago