HTTP Requests
Making basic HTTP requests and URL normalization.
HTTP Requests
The core feature of NetShift is making HTTP requests directly from your terminal. It supports standard HTTP methods and automatically handles URL validation and normalization before any request is sent.
Usage
The general syntax for making a request is:
ns <method> <url> [options]Supported Methods
You can use standard HTTP methods like GET, POST, PUT, PATCH, and DELETE. The method name is case-insensitive.
Examples
Fetching a resource (GET)
ns get https://jsonplaceholder.typicode.com/todos/1Submitting data (POST)
When testing endpoints that receive data, you can specify the POST method. Note: Advanced body payloads are planned for future releases.
ns post https://httpbin.org/postURL Validation & Normalization
Before a request starts, NetShift processes the provided URL:
- Trims any surrounding whitespace.
- Validates that it's a properly formatted URL structure.
- Automatically fixes missing protocols if possible.
When you run a command, you will see a confirmation message indicating exactly where the request is heading:
Making GET request to: https://jsonplaceholder.typicode.com/todos/1This helps you ensure your request was parsed exactly as intended.