actix-multiresponse

actix-multiresponse intents to allow supporting multiple response/request data formats depending on the Content-Type and Accept headers

Latest version: 0.4.2 registry icon
Maintenance score
0
Safety score
0
Popularity score
70
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
0.4.2 0 0 0 0 0
0.4.1 0 0 0 0 0
0.4.0 0 0 0 0 0
0.3.0 0 0 0 0 0
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.4.2 - This version may not be safe as it has not been updated for a long 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.

Apache-2.0   -   Apache License 2.0

Not a wildcard

Not proprietary

OSI Compliant


MIT   -   MIT License

Not a wildcard

Not proprietary

OSI Compliant



actix-multiresponse

actix-multiresponse intents to allow supporting multiple response/request data formats depending on the Content-Type and Accept header.

Supported formats

  • Json
  • Protobuf
  • XML

All formats can be enabled using equally-named feature flags. At least one format should be enabled. By default json and protobuf are enabled.

Example

use prost_derive::Message;
use serde_derive::{Deserialize, Serialize};
use actix_multiresponse::Payload;

#[derive(Deserialize, Serialize, Message, Clone)]
struct TestPayload {
    #[prost(string, tag = "1")]
    foo: String,
    #[prost(int64, tag = "2")]
    bar: i64,
}

async fn responder(payload: Payload<TestPayload>) -> Payload<TestPayload> {
    payload
}

License

actix-multiresponse is dual licensed under the MIT or the Apache-2.0 license, at your discretion