Skip to content

nt-client is a lightweight command-line HTTP client written in Rust. It allows you to send customizable HTTP requests (GET, POST, etc.) to a specified host and port, making it ideal for learning how HTTP and TCP connections work under the hood.

Notifications You must be signed in to change notification settings

kush-bot/nt-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nt-client

nt-client is a simple command-line HTTP client written in Rust. It supports making GET and POST requests over TCP connections, allowing you to specify the host, port, request path, HTTP method, and request body.


Features

  • Make HTTP GET and POST requests.
  • Customize host, port, path, HTTP method, and body via CLI flags.
  • Supports sending JSON payloads.
  • Prints HTTP response status and summary.
  • Lightweight and easy to extend.

Installation

Make sure you have Rust and Cargo installed. Then clone the repo and build the project: nt-client demo nt-client demo nt-client demo

git clone https://github.com/yourusername/nt-client.git
cd nt-client
cargo build --release


cargo run -- --host example.com --port 80 --path /posts/1 --method GET## Demo


cargo run -- --host jsonplaceholder.typicode.com --port 80 --path /posts --method POST --body '{"title":"foo","body":"bar","userId":1}'

About

nt-client is a lightweight command-line HTTP client written in Rust. It allows you to send customizable HTTP requests (GET, POST, etc.) to a specified host and port, making it ideal for learning how HTTP and TCP connections work under the hood.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages