This PR allows for the customization of the reqwest client that the arweave struct uses. This way I can pass custom headers to all the requests in an easy manner such as this:
let mut headers = header::HeaderMap::new();
headers.insert(
"X-Network",
header::HeaderValue::from_static("arweave.testnet"),
);
let mut builder = Client::builder();
builder = builder.default_headers(headers);
let c = builder.build().unwrap();
let r = c
.get("http://localhost:1984/tx/ready_for_mining")
.header("Content-Type", "application/x-www-form-urlencoded")
.send()
.await?
.text()
.await?;
Also added actual methods for last_tx and tx_anchor
This PR allows for the customization of the reqwest client that the arweave struct uses. This way I can pass custom headers to all the requests in an easy manner such as this:
Also added actual methods for last_tx and tx_anchor
Thanks for this lib :)