wild-doc-webserver 0.0.7

This is still in development.
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::{fs::File, io::Read};

use hyper::{Body};
use wild_doc_client_lib::WildDocClient;

pub(crate) fn make(wdc:&mut WildDocClient,filename:&str,json:&str)->std::io::Result<Body>{
    let mut f=File::open(filename)?;
    let mut xml=String::new();
    f.read_to_string(&mut xml)?;
    Ok(Body::from(
        wdc.exec(&xml,json)?
    ))
}