Convert CURL commands to Rust code online

Curl command

Examples: GET - POST - JSON - Basic Auth - Files - Form

CURL to Rust online

This tool helps you to generate Rust code based on CURL command. Copy and paste CURL command and generate Rust.

What can you do with CURL to Rust converter online?

  • CURL to Rust is very unique tool to convert CURL command to Rust request of Rust. The input provide by the user's CURL command to generate Rust code.
  • This tool saves your time and helps to generate Rust code with ease.
  • CURL to Rust works well on Windows, MAC, Linux, Chrome, Firefox, Edge and Safari.

what is CURL?

CURL is an open-source command line tool that downloads files from the web. It supports a variety of protocols, including Rust, RustS, FTP, SFTP, TFTP, Gopher and others.

How do convert CURL to Rust code? 

Step1: Paste and convert your CURL requests to Rust code

Step2: Copy Rust code

Convert CURL to Rust example

CURL
curl example.com
PHP Guzzle
extern crate reqwest;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::blocking::Client::builder()
        .redirect(reqwest::redirect::Policy::none())
        .build()
        .unwrap();
    let res = client.get("http://example.com")
        .send()?
        .text()?;
    println!("{}", res);

    Ok(())
}