Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Infiniflow Ragflow Next Request

From Leeroopedia
Knowledge Sources
Domains Frontend, Networking, Infrastructure
Last Updated 2026-02-12 06:00 GMT

Overview

Concrete Axios-based HTTP client instance with request/response interceptors for authentication, error handling, and token management in the RAGFlow frontend.

Description

The utils/next-request.ts module configures and exports an Axios instance with: request interceptors (attach auth token, set content type), response interceptors (handle 401 unauthorized by redirecting to login, extract data from response envelope), and base URL configuration.

Usage

This is the core HTTP client used by all "next" generation service modules. Import it in service files that need to make authenticated API calls.

Code Reference

Source Location

Signature

const request: AxiosInstance;
export default request;

Import

import request from '@/utils/next-request';

I/O Contract

Inputs

Name Type Required Description
config AxiosRequestConfig Yes Request configuration

Outputs

Name Type Description
returns AxiosInstance Configured Axios instance with interceptors

Usage Examples

import request from '@/utils/next-request';

const response = await request.get('/api/v1/datasets');
const data = response.data;

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment