Insomnia is an API client that enables you to send API requests outside of your terminal, and without writing any code. This means you don’t have to write any finicky cURL requests or backend code to quickly retrieve information, push content to a database, and do anything else a given API enables you to do.
In this guide, we’ll talk specifically about HTTP requests. This will give us common ground to send off a first request together. If you want to learn to send gRPC and GraphQL requests, see our more comprehensive Requests documentation.
Here’s some common terminology that’ll help you navigate the world of APIs:
petstore.com
with the endpoint /inventory
. If I make a request to petstore.com/inventory
, I’ll get back a list of the pet store’s product inventory.An API request is composed of discrete elements that let you interact with an API. Some common elements you may need are:
GET
: returns information from an API.POST
: sends data you’ve entered, and returns a confirmation that the data you sent was received.PATCH
and PUT
: sends data that modifies a record that an API has access to.DELETE
: deletes a record that an API has access to.In this section, we’re going to send a GET
request to the Insomnia website. Feel free to interchange the Insomnia website URL with any web URL you’d like to return in the Preview panel.
Return Insomnia website
.GET
method from the dropdown.insomnia.rest
in the request URL input.Click Send.
Once you’ve clicked Send on your request, you should see the Insomnia website in the right-side Preview panel. Note that this screenshot shows a Document (not a Collection).
Congrats! You’ve now used Insomnia to send your first request to the Insomnia website. For more complex request options, see our Request documentation.