fxtch
TypeScript icon, indicating that this package has built-in type declarations

0.6.0 • Public • Published

fxtch

A tiny (~1.2kb) wrapper around fetch for an easier API.

Install

npm install fxtch

Example

await fxtch("https://example.com")

await fxtch
  .post("https://example.com")
  .set("Authorization", "Bearer <token>")  
  .send({ name: "Matheus" })

fxtch
  .get("https://example.com")
  .query({ limit: 50 })
  .then(console.log)

const api = fxtch
  .client()
  .baseUrl('https://example.com/')
  .set({ Authorization: 'blabla' })

await api.post('/users')
await api.post('/users')

Package Sidebar

Install

npm i fxtch

Weekly Downloads

3

Version

0.6.0

License

MIT

Unpacked Size

10.2 kB

Total Files

11

Last publish

Collaborators

  • matheusbn