cangjie-http-server

Develop HTTP servers in Cangjie using the stdx.net.http library.

2|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-http-server-zhenzhizhi12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-http-server
Source: https://github.com/zhenzhizhi12/NexusAgent/tree/main/.opencode/skills/common-skill-l1/http_server
Command: npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-http-server-zhenzhizhi12

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive tools and guidance for developing HTTP servers using the Cangjie language, enabling developers to build web services and APIs efficiently.

Core Features & Use Cases

  • Server Configuration: Detailed options for ServerBuilder, including address, port, timeouts, and transport configurations.
  • Routing and Request Handling: Flexible methods for registering route handlers and processing incoming requests (HttpRequestContext, HttpResponseBuilder).
  • Built-in Handlers: Utilities for common tasks like 404 responses, redirects, and static file serving.
  • Advanced Features: Support for chunked transfer, trailers, cookie management, Gzip compression, and graceful shutdown.
  • Use Case: Develop a RESTful API for a web application, handling GET, POST, and other HTTP methods with custom logic and responses.

Quick Start

Use the cangjie-http-server skill to create a simple HTTP server that responds with "Hello Cangjie!" on the root path.

Frequently Asked Questions about cangjie-http-server

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

FAQPage Schema
How do I build an HTTP server in Cangjie?

To build an HTTP server in Cangjie, use the `ServerBuilder` from the `stdx.net.http` library to configure the address and port, then register route handlers to process incoming requests and generate responses.

Can I serve static files and handle redirects with a Cangjie web server?

Yes, the Cangjie HTTP server provides built-in handlers specifically for common web tasks like serving static files, issuing redirects, and returning 404 responses without requiring custom logic.

Does the Cangjie HTTP server support HTTP/2.0 and chunked transfer encoding?

The Cangjie HTTP server supports HTTP/1.0, HTTP/1.1, and HTTP/2.0 protocols, and includes advanced features for chunked transfer encoding, trailers, and Gzip compression.

How do I manage cookies and ensure graceful shutdown in a Cangjie API?

The `stdx.net.http` library includes built-in utilities for cookie management and graceful shutdown, allowing your Cangjie API to maintain session state and close connections safely.

What is the best way to handle RESTful API requests in Cangjie?

The best way to handle RESTful API requests in Cangjie is by using `HttpRequestContext` to process incoming GET and POST methods, then utilizing `HttpResponseBuilder` to construct custom logic responses.