REQ is a versatile command-line tool inspired by curl
, implemented using Spring Shell and Reactive Web.
- Make HTTP requests with ease.
- Display comprehensive HTTP response details, including status code, headers, and body.
- Supports popular HTTP methods such as GET, POST, PUT, and DELETE.
- Customizable headers, request body, and authentication (TODO).
Make sure you have the following installed on your system:
- Java 17 or higher
- Maven
Choose one of the following options to start using REQ:
-
Clone the repository:
git clone https://github.com/ahmd-nabil/req.git cd req
-
Build and run the application with Java 17:
./mvnw clean install java -jar target/req-0.0.1-SNAPSHOT.jar
(NOTE: GraalVM 22.3+ required) [Getting Started]
-
Clone the repository:
git clone https://github.com/ahmd-nabil/req.git cd req
-
Build a native image with GraalVM:
./mvnw native:compile -Pnative -DskipTests=true
-
Add the executable path to system PATH:
- on windows
setx PATH "%PATH%;C:\path\to\req\target"
- on windows
-
Run the application:
type
req
in cmd -
make HTTP requests:
NOTE:
http
andlocalhost
are the defaults for scheme and HOST-
For a GET request:
get http://localhost:8080
get localhost:8080
get :8080
-
For a POST request:
post http://localhost:8080 '{"name":"ahmed", "age":24}'
-
For a Delete request:
del http://localhost:8080/1
-
For a PUT request:
put http://localhost:8080/1 '{"name":"Ahmed", "age":22}'
-