Skip to content
madebyoutloudPublic

About

HTTP client based on Fetch API with built-in support for retries, timeouts, and JSON handling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Reqo

HTTP client based on Fetch API with built-in support for retries, timeouts, and JSON handling.

TypeScript Version Downloads License

Installation

npm install @outloud/reqo

Usage

import { reqo } from '@outloud/reqo'

const data = await reqo.$get<{ status: boolean }>('https://api.example.com/data', {
  query: { verbose: true },
  retry: { limit: 3 },
  timeout: 5000
})

console.log(data) // { status: true }

With an OpenAPI schema generated by openapi-typescript, requests are fully typed:

import { createSchemaClient } from '@outloud/reqo'
import type { paths } from './api.js'

const api = createSchemaClient<paths>({ url: 'https://api.example.com' })

const event = await api.$get('/special-events/{eventId}', {
  params: { eventId: '123' }
})

Documentation

To learn more, check documentation.

About

HTTP client based on Fetch API with built-in support for retries, timeouts, and JSON handling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages