RegisterLogin
DocsPricing
RegisterLogin
  • Getting Started
  • Introduction
  • Quick Start
  • SDKs
  • React
  • TypeScript
  • Next.js
  • Express
  • NestJS
  • Python
  • API Reference
  • Support and Resources
  • FAQ
  • Contact

HttpService

HTTP client wrapper for making authenticated API requests to AuthSafe endpoints.


Overview

The HttpService provides a convenient wrapper around Axios for HTTP requests with automatic Bearer token injection and error handling. Pre-configured with Base URL, Content-Type, Cache-Control, and Authorization headers with a default timeout of 10 seconds.


Basic Usage

import { HttpService } from 'authsafe-ts';

const user = await oauthService.getUser();
const httpService = new HttpService(user?.access_token);

const userInfo = await httpService.get('/auth/userinfo');

Best Practices
  • HttpService is designed to be used with API clients (MfaApi, UserApi) rather than directly
  • 401 Unauthorized automatically throws an error for redirect handling
  • Default timeout is 10 seconds — adjust as needed for your use case

AuthSafe

Product

HighlightFeatureIntegrationPricingFAQ

Company

AboutBlogContact

Developer

DashboardDocumentation

Legal

Terms & ConditionsPrivacyComplianceShippingCancellationAI

© 2026 AuthSafe. All rights reserved.

Valoramos su privacidad

Este sitio web utiliza cookies para análisis anónimos que nos ayudan a mejorar su experiencia. No se almacena ni comparte información personal. Puede permitir o rechazar el seguimiento analítico en cualquier momento. Consulte nuestra Política de Privacidad.

Usamos cookies para análisis anónimos. No se almacena información personal. Consulte nuestra Política de Privacidad.