基于vue3.0和element-plus的组件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1.4 KiB

Fill plugs/http spec

Goal

Analyze the plugs/http/ directory and document the HTTP client variants, request/response handling, and interceptors.

Context

HTTP Clients (3 variants)

The project has 3 axios variants suggesting evolutionary API design:

File Purpose
plugs/http/axios.ts Basic axios wrapper
plugs/http/axios2.ts Second iteration
plugs/http/axios3.ts Third iteration with AxiosOptions

Key Types

  • AxiosOptions (from axios3.ts)
  • PageResponse (from plugs/http/misc.ts)

Tools Available

GitNexus MCP

Tool Purpose
gitnexus_context View AxiosOptions and HTTP types

Files to Fill

  1. plugs/http/axios.ts - Base axios instance
  2. plugs/http/axios2.ts - Second variant
  3. plugs/http/axios3.ts - Third variant with full options
  4. plugs/http/misc.ts - Misc HTTP utilities (PageResponse type)
  5. plugs/http/index.ts - Exports

Document:

  • Request/response interceptor patterns
  • Error handling approach
  • Base URL configuration
  • Timeout settings
  • Authentication headers

Acceptance Criteria

  • Real code examples with file paths
  • Axios instance configuration documented
  • Interceptor patterns captured
  • Type definitions (AxiosOptions, PageResponse)
  • No placeholder text

Technical Notes

  • Axios for HTTP
  • Related: plugs/api/* for API usage