docs Getting started
Quick start
Write your first request file, send a request, or create a starter project with resterm init.
- Save the example below as a
.httpor.restfile in your project directory. You can also use a sample from_examples/. - Run
resterm --workspace path/to/project. - Expand the file in the navigator sidebar with
→orSpace. Highlight a request and pressCtrl+Enterto send it. With a request highlighted,Enteralso sends it andSpacepreviews it. - Read the response in the tabs on the right: Pretty, Raw, Headers, Diff, Compare, or History.
A minimal .http file looks like this:
### Fetch Status
# @name health
GET https://httpbin.org/status/204
User-Agent: resterm
Accept: application/json
### Create Resource
# @name create
POST https://httpbin.org/anything
Content-Type: application/json
{
"id": "{{$uuid}}",
"note": "created from Resterm"
}To compare environments, press g+c. This runs the current request against the --compare targets, or the targets in its @compare directive, and shows the results beside the editor.
Initializing a Project
resterm init writes a starter workspace so you can send requests right away:
mkdir my-api && cd my-api
resterm initRun resterm in the same directory. Press g Shift+M to start the local mock server, then use Ctrl+Enter to try the sample requests. Press Ctrl+E to switch between the local dev and test environments. resterm init covers the templates and flags.