forked from mengyxu/noob-components
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
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
- plugs/http/axios.ts - Base axios instance
- plugs/http/axios2.ts - Second variant
- plugs/http/axios3.ts - Third variant with full options
- plugs/http/misc.ts - Misc HTTP utilities (PageResponse type)
- 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