Requests
Insomnia supports sending requests via HTTP, gRPC, GraphQL, and WebSockets.
To learn how to repurpose parts of your request, see
Environment Variables.
Send an HTTP request
Send an HTTP method request in a Document or Collection. The following instructions
assume you’re starting with an empty Document or Collection.
In addition to standard HTTP methods, Insomnia supports Custom HTTP Methods.
- In a Document, select the Debug tab, then New Request. In a Collection, select New Request.
- From the New Request modal:
- Click HTTP Request
- Double-click on New Request on the lefthand pane to rename the request.
- Select a method from the dropdown next to the URL text box.
- Enter the API URL in the request URL input field.
- To add authentication, go to the Auth tab. Use the Auth dropdown to select your authentication method.
- When you have entered your request URL and authentication, click Send.
See Request Options to customize your request.
Request Options
Modify any HTTP method or GraphQL request with the following options.
Option |
Description |
Body |
Select a body type from the Body dropdown menu on the tab. Add content that you want to send in the body of the request. |
Auth |
The authentication for the request. Select an authentication type from the Auth dropdown menu on the tab. |
Query |
Add query parameters to your request URL. For example, ?page=1 . |
Header |
Add a header to your request. For example, Content-Type: application/json . |
Docs |
The request description. |
Custom HTTP Methods
Add your own custom HTTP methods through the New Request modal dropdown or the methods dropdown.
- Click on Custom Method.
- An HTTP Method modal will appear. Enter your method name.
- Click Done.
To access existing custom methods, click on Custom Method in the methods dropdown.
Send a gRPC request
Send a gRPC method request in a Document or Collection. The following instructions
assume you’re starting with an empty Document or Collection.
- In a Document, select the Debug tab, then New Request. In a Collection, select New Request.
- In the New Request modal:
- Double-click on New Request on the lefthand pane to rename the request.
- Select gRPC from the dropdown.
- You’ll be taken to a Select Proto File modal.
- Click Add Directory or Add Proto File.
- Add your directory or upload your Proto File. Insomnia will automatically detect the streaming types and modify the first tab as such.
- Enter your API URL and click Start.
See gRPC Request Options to customize your request.
gRPC request options
Modify any gRPC request with the following options.
Option |
Description |
Streaming Type Example: Unary |
The body of the request. The tab displays the streaming type, auto-detected from the Proto File or directory.
Streaming types are: Unary, Server Streaming, Client Streaming, and Bidirectional Streaming. |
Headers |
Add gRPC metadata to your request. For example, Content-Type: application/grpc . |
Send a GraphQL request
Send a GraphQL method request in a Document or Collection. The following instructions
assume you’re starting with an empty Document or Collection.
- In a Document, select the Debug tab, then New Request. In a Collection, select New Request.
- In the New Request modal:
- Double-click on New Request on the lefthand pane to rename the request.
- Select POST from the dropdown.
- Another dropdown will appear to the right. Open it and select GraphQL Query.
- Enter the API URL in the request URL input field.
- In the GraphQL body tab, add you GraphQL schema.
- To add authentication, go to the Auth tab. Use the Auth dropdown to select your authentication method.
- When you have entered your request URL and authentication, click Start or Send.
See Request Options to customize your request.
Send a WebSocket request
Send a Websocket request in a Document or Collection. The following instructions assume you’re starting with an empty Document or Collection.
- In a Document, select the Debug tab, then New Request. In a Collection, select New Request.
- From the New Request modal:
- Click on WebSocket Request
- Double-click on New Request on the lefthand pane to rename the request.
- Enter the API URL in the request URL input field.
- To add authentication, go to the Auth tab. Use the Auth dropdown to select your authentication method.
- Enter the request URL and authentication method, and click Connect.
- To send messages while connected to a Websocket API:
- Click the message editor pane, underneath the Send button.
- Compose the message you want to send.
- Click on the down arrow next to the JSON tab, and select Raw to compose a raw message.
- Click Send
- View WebSocket events by clicking on the Events tab on the right-hand pane.
- View event details by clicking an event.
- To disconnect the WebSocket connection, click Disconnect.
See Request Options to customize your request.