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.

Nous respectons votre vie privée

Ce site utilise des cookies pour des analyses anonymes afin d'améliorer votre expérience. Aucune information personnelle n'est stockée ni partagée. Vous pouvez autoriser ou refuser le suivi analytique à tout moment. Consultez notre Politique de Confidentialité.

Nous utilisons des cookies pour des analyses anonymes. Aucune donnée personnelle n'est stockée. Consultez notre Politique de Confidentialité.