salvo-data-extraction

Extract and validate HTTP request data in Salvo applications using serde and validator.

20|5|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/salvo-rs/salvo-skills --skill salvo-data-extraction
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: salvo-data-extraction
Source: https://github.com/salvo-rs/salvo-skills/tree/main/skills/salvo-data-extraction
Command: npx skills add https://github.com/salvo-rs/salvo-skills --skill salvo-data-extraction

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automatically extract and validate input data from HTTP requests to reduce boilerplate and prevent invalid payloads in Salvo-based services.

Core Features & Use Cases

  • Extract data from JSON bodies, query parameters, path parameters, and form data.
  • Support Depot context injected by middleware for authenticated or request-scoped data.
  • Validate inputs using serde-derived types and validator rules, with clear error handling.

Quick Start

Provide a sample request that demonstrates extracting JSON, query, and path data using Salvo.

Frequently Asked Questions about salvo-data-extraction

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

FAQPage Schema
How do I extract and validate JSON bodies in Salvo web applications?

To extract and validate JSON bodies in Salvo, use serde-derived types with the Extractible trait. This enforces typed extraction and validation workflows to ensure correct payload structures and robust error reporting for HTTP requests.

Can I extract query parameters and path parameters simultaneously in a Salvo handler?

Yes, Salvo supports multi-source data access within API handlers. You can simultaneously extract query parameters, path parameters, and JSON bodies to reduce boilerplate and prevent invalid payloads in your services.

How does Salvo handle request data validation to prevent invalid payloads?

Salvo handles request data validation using the validator crate alongside serde-derived types. This combination enforces typed extraction rules across multiple data sources, ensuring correct payload structures and clear error handling.

Does Salvo support extracting data from middleware context like Depot?

Yes, Salvo supports Depot context injected by middleware for authenticated or request-scoped data. You can extract this context data alongside form data, query parameters, and JSON bodies within your API handlers.

What is the best way to reduce boilerplate when parsing form data in Salvo?

The best way to reduce boilerplate when parsing form data in Salvo is using the Extractible trait with serde. This automatically extracts and validates input data from HTTP requests, enforcing typed structures across multiple sources.

How do I return clear validation errors when extracting HTTP request data in Salvo?

To return clear validation errors when extracting HTTP request data in Salvo, use the validator crate with serde-derived types. This setup provides robust error reporting workflows when invalid payload structures are encountered during extraction.