Insomnia logo
  • Documentation
  • Download
  • Upgrade
    • Introduction to Insomnia
    • Install Insomnia
    • Send Your First Request
    • Import and Export Data
    • Environment Variables
    • Insomnia Workspaces
    • Insomnia Accounts
    • Forgotten Passwords
    • Change Password
    • Insomnia Teams
    • Insomnia Subscriptions
    • Insomnia Subscription Management
    • Requests
    • Responses
    • Request Collections
    • Request Timeouts
    • Chaining Requests
    • Post CSV Data
    • SOAP Requests
    • gRPC
    • WebSocket Support
    • Get Started with Documents
    • Design Documents
    • Linting
    • GraphQL for OpenAPI
    • Migrate from Designer
    • Unit Testing
    • Stress Testing
    • Sign into Insomnia Cloud
    • Sync Collections with Insomnia Cloud
    • Teams
    • End to End Data Encryption
    • Sync with Git
    • Key Security Features
    • Security Standards
    • Signup and Authentication
    • Analytics Collected
    • Authentication
    • Client Certificates
    • Generate Code Snippet
    • Cookie Management
    • Encoding
    • GraphQL Queries
    • Run in Insomnia Button
    • Key Maps
    • HTTP(S) Proxy
    • Insomnia Configuration File
    • Introduction to Plugins
    • Context Object Reference
    • Template Tags
    • Hooks and Actions
    • Custom Themes
    • FAQ
    • Application Data
    • SSL Validation
    • Password Recovery
    • Introduction to Inso CLI
    • Install Inso CLI
    • CLI Command Reference
      • inso generate config
      • inso run test
      • inso lint spec
      • inso export spec
      • inso script
      • OpenAPI Spec Reference
    • Configuration
    • Inso CLI on Docker
    • Continuous Integration
    • Publish API to Dev Portal
    • Kong Declarative Config (for decK)
    • Kong for Kubernetes

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.

  1. In a Document, select the Debug tab, then New Request. In a Collection, select New Request.
  2. From the New Request modal:
    1. Click HTTP Request
    2. Double-click on New Request on the lefthand pane to rename the request.
    3. Select a method from the dropdown next to the URL text box.
  3. Enter the API URL in the request URL input field.
  4. To add authentication, go to the Auth tab. Use the Auth dropdown to select your authentication method.
  5. 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.

  1. Click on Custom Method.
  2. An HTTP Method modal will appear. Enter your method name.
  3. 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.

  1. In a Document, select the Debug tab, then New Request. In a Collection, select New Request.
  2. In the New Request modal:
    1. Double-click on New Request on the lefthand pane to rename the request.
    2. Select gRPC from the dropdown.
  3. You’ll be taken to a Select Proto File modal.
  4. Click Add Directory or Add Proto File.
  5. Add your directory or upload your Proto File. Insomnia will automatically detect the streaming types and modify the first tab as such.
  6. 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.

  1. In a Document, select the Debug tab, then New Request. In a Collection, select New Request.
  2. In the New Request modal:
    1. Double-click on New Request on the lefthand pane to rename the request.
    2. Select POST from the dropdown.
    3. Another dropdown will appear to the right. Open it and select GraphQL Query.
  3. Enter the API URL in the request URL input field.
  4. In the GraphQL body tab, add you GraphQL schema.
  5. To add authentication, go to the Auth tab. Use the Auth dropdown to select your authentication method.
  6. 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.

  1. In a Document, select the Debug tab, then New Request. In a Collection, select New Request.
  2. From the New Request modal:
    1. Click on WebSocket Request
    2. Double-click on New Request on the lefthand pane to rename the request.
  3. Enter the API URL in the request URL input field.
  4. To add authentication, go to the Auth tab. Use the Auth dropdown to select your authentication method.
  5. Enter the request URL and authentication method, and click Connect.
  6. To send messages while connected to a Websocket API:
    1. Click the message editor pane, underneath the Send button.
    2. Compose the message you want to send.
      1. Click on the down arrow next to the JSON tab, and select Raw to compose a raw message.
    3. Click Send
  7. View WebSocket events by clicking on the Events tab on the right-hand pane.
    1. View event details by clicking an event.
  8. To disconnect the WebSocket connection, click Disconnect.

See Request Options to customize your request.

Edit this page
Report an issue
    COMPANY
  • Insomnia
  • Blog
  • Changelog
  • Pricing
  • Careers
    PRODUCTS
  • Insomnia
  • Inso (CLI)
    RESOURCES
  • Sign In
  • Documentation
  • Support
    LEGAL
  • Privacy Policy
  • Terms & Conditions
© Kong Inc. 2021