actix-xml

XML extractor for actix-web

Latest version: 0.2.0 registry icon
Maintenance score
91
Safety score
100
Popularity score
71
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
0.2.0 0 0 0 0 0
0.1.1 0 0 0 0 0
0.1.0 0 0 0 0 0

Stability
Latest release:

0.2.0 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

MIT   -   MIT License

Not a wildcard

Not proprietary

OSI Compliant



actix-xml

crates.io Documentation

XML extractor for actix-web.

This crate provides struct Xml that can be used to extract typed information from request's body.

Under the hood, quick-xml is used to parse payloads.

Example

use actix_web::{web, App};
use actix_xml::Xml;
use serde::Deserialize;

#[derive(Deserialize)]
struct Info {
    username: String,
}

/// deserialize `Info` from request's body
async fn index(info: Xml<Info>) -> String {
    format!("Welcome {}!", info.username)
}

fn main() {
    let app = App::new().service(
        web::resource("/index.html").route(
            web::post().to(index))
    );
}

Features

  • encoding: support non utf-8 payload
  • compress-brotli(default): enable actix-web compress-brotli support
  • compress-gzip(default): enable actix-web compress-gzip support
  • compress-zstd(default): enable actix-web compress-zstd support

If you've removed one of the compress-* feature flag for actix-web, make sure to remove it by setting default-features=false, or it will be re-enabled for actix-web.

Version Support

  • 0.1.x - supports actix-web 3.3.x
  • 0.2.0-beta.0 - supports actix-web 4.0.0.beta.8
  • 0.2.0 - supports actix-web 4.0.x

License

MIT