axum-xml-up
Fork of https://github.com/PhotonQuantum/axum-xml updating it to the latest axum 0.7 version for axum 0.6 use v0.1 of this library
XML extractor for axum.
This crate provides struct Xml that can be used to extract typed information from request's body.
Uses quick-xml to deserialize and serialize the payloads
[]
= "0.2"
Features
encoding: support non utf-8 payload
Request Example
When used as an Extractor XML content can be deserialized from the request body into some type that implements serde::Deserialize. If the request body cannot be parsed, or it does not contain the Content-Type: application/xml header, it will reject the request and return a 400 Bad Request response.
use ;
use Deserialize;
use Xml;
async
async
Response Example
When used as a response, it can serialize any type that implements serde::Serialize to XML, and will automatically set Content-Type: application/xml header.
use ;
use Deserialize;
use Xml;
async
async
async
License
MIT