kriogenia / rede

CLI tool to run and configure suites of HTTP requests defined in readable files
http://rede.sotoestevez.dev/
Apache License 2.0
1 stars 3 forks source link

Added ZIP, GZIP and GIF convenience body types #66

Closed toastx closed 1 week ago

toastx commented 1 week ago

Expanded Body of parser/src/schema/body.rs for body.zip, body.gzip, body.gif as per #63

#[serde(alias = "gzip", alias = "gz")]
    Gzip(String),
#[serde(alias = "zip")]
    Zip(String),
#[serde(alias = "gif")]
    Gif(String),

and added custom mime types

Body::Gzip(path) => SchemaBody::Binary { 
                path, 
                mime: Mime::from_str("application/gzip").unwrap()
            },
Body::Zip(path) => SchemaBody::Binary { 
                path, 
                mime: Mime::from_str("application/zip").unwrap() 
            },
Body::Gif(path) => SchemaBody::Binary { 
                path, 
                mime: mime::IMAGE_GIF,
            },
kriogenia commented 1 week ago

Awesome work again, @toastx

I'm merging this. Thank you for your time.