HTTP Methods Reference

XyPriss provides a comprehensive set of methods to handle standard HTTP verbs. These map directly to the underlying XHSC engine, ensuring high-performance and full compliance with web standards.

Core Methods

GET

Retrieve resources. Supports query parameter parsing.

POST

Submit entities. Automatically parses JSON/URL-encoded bodies.

PUT

Replace target resource with the request payload.

PATCH

Apply partial modifications to a resource.

DELETE

Delete resource. Supports body parsing for complex criteria.

Advanced & Utility Methods

OPTIONS

Used to describe communication options. In most setups, preflight OPTIONS requests are handled automatically by the CORS security middleware.

Identical to GET but without the response body. XyPriss executes the routing logic but discards the body before transmission, sending only headers.

CONNECT, TRACE

XyPriss fully supports CONNECT (for proxy tunneling) and TRACE (for diagnostic loop-backs).

The Catch-All: app.all()

Matches all HTTP methods for a specific path. Useful for global logic or section-specific middleware.

typescript
app.all("/api/*", (req, res, next) => {
    console.log("API request:", req.method, req.url);
    next();
});

Body Parsing Intelligence

XyPriss employs smart body parsing logic. The req.body is populated automatically if:

  • The method is POST, PUT, PATCH, or DELETE.
  • The Content-Length header is present and greater than 0.
  • The Transfer-Encoding header is present (chunked transfer).
Performance Tip
Because XyPriss offloads initial HTTP parsing to the native Go core, headers and method identification happen with sub-microsecond latency.
Configuration Guide

Learn how to configure your XyPriss server for production workloads.