uniapp-request-skill

Design unified request layers for uni-app mini-programs with authentication and SSE streaming.

44|11|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/jiushiwon/wg-skills --skill uniapp-request-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: uniapp-request-skill
Source: https://github.com/jiushiwon/wg-skills/tree/main/uniapp-request-skill
Command: npx skills add https://github.com/jiushiwon/wg-skills --skill uniapp-request-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill replaces scattered uni.request calls with a unified, maintainable request layer for uni-app mini-programs, reducing duplicated authentication, error handling, retry, and request coordination logic.

Core Features & Use Cases

  • Unified Request Wrapper: Design request.ts with typed GET, POST, PUT, and DELETE helpers, configurable prefixes, headers, timeouts, and cancellation.
  • Authentication Coordination: Inject tokens, support bearer and customer-token headers, handle guest access, process 401 and 403 responses, and connect token refresh queues to an auth service.
  • Reliability and Development Support: Add concurrent-request deduplication, configurable network retries, environment-controlled Mock data, standardized error mapping, file uploads with progress callbacks, and cross-platform SSE streaming for AI chat interfaces.
  • Use Case: Apply the Skill when building or reviewing a uni-app project that needs protected APIs, token expiration recovery, offline-friendly development, reliable form submission, media uploads, or streaming assistant responses.

Quick Start

Ask the uniapp request skill to design or review the request layer for your uni-app project, including authentication, Mock data, retries, uploads, and SSE streaming.

Frequently Asked Questions about uniapp-request-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a unified uni-app request layer with token refresh and retry handling?

A unified uni-app request layer wraps typed GET, POST, PUT, and DELETE helpers to handle authentication token injection, concurrent request deduplication, and configurable network retries across mini-program platforms.

How does SSE streaming work in uni-app for AI chat interfaces?

SSE streaming in uni-app requires cross-platform transport handling to process server-sent events, enabling real-time AI assistant response delivery and progressive text rendering within mini-program chat interfaces.

What's the best way to handle 401 and 403 authentication errors in uni-app mini-programs?

Handling 401 and 403 errors in uni-app requires authentication interception that connects token refresh queues to an external auth service, automatically recovering expired sessions without losing user context.

Can I use Mock data with a uni-app request wrapper for offline development?

Yes, a uni-app request wrapper supports environment-controlled Mock data, allowing developers to simulate API responses for offline-friendly development and testing without hitting live backend services.

How do I add file upload progress callbacks to a uni-app request layer?

Adding file upload progress to a uni-app request layer involves configuring upload helpers with progress callbacks, enabling real-time transfer tracking and media upload handling within TypeScript interfaces.

Does uni-app request deduplication help with concurrent API calls?

Request deduplication in a uni-app request layer prevents duplicate concurrent API calls by identifying and merging identical outgoing requests, reducing server load and avoiding redundant data fetching.