I ran this code. And I got result it have a prefix. How can I get pure content?
#[tokio::test]
async fn ipfs_test() {
let client = IpfsClient::from_str("http://localhost:5002").unwrap();
let data = Cursor::new("Hello World!");
let hash = client.add(data).await.unwrap().hash;
println!("{:?}++++++++++++++++++++++", hash);
let file = client.get(&format!("/ipfs/{}", hash));
match file.map_ok(|chunk| chunk.to_vec()).try_concat().await {
Ok(res) => {
let out = io::stdout();
let mut out = out.lock();
out.write_all(&res).unwrap();
}
Err(e) => eprintln!("{}", e),
}
}
I ran this code. And I got result it have a prefix. How can I get pure content?