ferristseng / rust-ipfs-api

IPFS HTTP client in Rust
Apache License 2.0
246 stars 68 forks source link

HTTPError: file argument'value-file' is required #129

Closed gcp-development closed 1 year ago

gcp-development commented 1 year ago

Probably I am doing something wrong. But I am trying to write a key/value pair to the DHT.

let client = IpfsClient::default(); let res = client.dht_put("test", "Hello World!").trycollect::<Vec<>>();

But I am getting: Item: Err(IpfsClientError(UnrecognizedApiError("file argument 'value-file' is required\n")))

I have try this in several ways but I am not able to go over this.

->key:/ipns/peerID ->value:/ipfs/CID

Or there is other format for this function?

Thanks.

Some updated info about this crate. This command is deprecated. https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-dht-put

Cheers,