Documentation
Getting Started
Endpoints
Language Guides
Rust World Time API Implementation
Type-safe implementation using the reqwest crate.
Rust Integration Snippet
use reqwest; // reqwest = { version = "0.11", features = ["json"] }
#[tokio::main]
async fn main() -> Result<(), Box<dyn std.error::Error>> {
let resp = reqwest::get("https://currenttime.now/public/api/ip")
.await?
.json::<serde_json::Value>()
.await?;
println!("Time: {}", resp["datetime"]);
Ok(())
}