Skip to main content

HTTP-PRO

Fetch HTTP requests like pro

Why Http pro?

  • Built on top of the Browser's fetch api.
  • Better Typescript support than default fetch API.
  • Simpler syntax.
  • Works well with URL, Header, URLSearchParams, Request Objects.
  • interceptor function.
  • Instance and extending instances with defaults.
  • validate your response with zod and yup.
  • Light weight (gzipped < 6kb).

Why Http pro over axios?

  • axios uses XMLHttpRequests in browser. so it can't leverage all the new features that javascript provides with fetch-api. for example, axios does not support the URL, Header, Request Objects.
  • it does not support service workers and Cache API out of the box.