Skip to main content

Requests

Requests are the fundamental building blocks of API testing in Nidra. Each request represents a single HTTP call to an API endpoint.

Request Components

A complete HTTP request in Nidra consists of:

  • Method: GET, POST, PUT, DELETE, PATCH, etc.
  • URL: The endpoint URL, with support for variables
  • Headers: HTTP headers for authentication, content type, etc.
  • Query Parameters: URL parameters
  • Body: Request payload (JSON, XML, form data, etc.)
  • Authentication: Built-in auth helpers

Creating a Request

  1. Select or create a collection
  2. Click "New Request"
  3. Configure the request components
  4. Click "Send" to execute

HTTP Methods

Nidra supports all standard HTTP methods:

  • GET: Retrieve data
  • POST: Create new resources
  • PUT: Update/replace resources
  • PATCH: Partial update
  • DELETE: Remove resources
  • HEAD: Get headers only
  • OPTIONS: Get supported methods

Request URL

URL Structure

https://api.example.com/v1/users?page=1&limit=10

Using Variables

You can use variables in URLs for dynamic values:

{{baseUrl}}/users/{{userId}}

Learn more about variables →

Headers

Headers provide metadata about the request:

Common Headers

  • Content-Type: Specify request body format
  • Accept: Specify desired response format
  • Authorization: Authentication credentials
  • User-Agent: Identify the client

Adding Headers

Query Parameters

Query parameters are key-value pairs in the URL:

Nidra provides a convenient params editor that automatically updates the URL.

Request Body

Body Types

Nidra supports multiple body formats:

  • JSON: Structured data (most common for REST APIs)
  • XML: Legacy and SOAP APIs
  • Form Data: File uploads and form submissions
  • Raw: Plain text, custom formats
  • Binary: File uploads

JSON Body Editor

The JSON editor provides:

  • Syntax highlighting
  • Auto-formatting
  • Variable substitution
  • Validation

Authentication

Nidra provides built-in authentication helpers:

  • Bearer Token: JWT and OAuth tokens
  • Basic Auth: Username/password
  • API Key: Header or query parameter
  • OAuth 2.0: Full OAuth flow support
  • Custom: Define your own auth logic

Learn more about authentication →

Sending Requests

Manual Execution

Click the "Send" button or use the keyboard shortcut (Ctrl/Cmd + Enter).

Request History

Nidra keeps a history of all sent requests for reference.

Response Handling

After sending a request, Nidra displays:

  • Status Code: HTTP status (200, 404, 500, etc.)
  • Response Time: How long the request took
  • Response Size: Size of the response
  • Headers: Response headers
  • Body: Response content with formatting
  • Cookies: Set-Cookie headers

Response Viewers

  • Pretty: Formatted JSON/XML
  • Raw: Unformatted response
  • Preview: HTML preview for web content

Saving Requests

Always save your requests to preserve them for future use:

  1. Click "Save"
  2. Provide a name
  3. Choose a collection

Request Variables

Use variables to make requests dynamic and reusable:

{
"email": "{{userEmail}}",
"environment": "{{env}}"
}

Learn about using variables →

Best Practices

  • Name requests clearly: Use descriptive names that explain the endpoint's purpose
  • Add descriptions: Document what the request does and expected responses
  • Use variables: Make requests environment-independent
  • Save frequently: Don't lose work by forgetting to save
  • Test edge cases: Test error scenarios, not just happy paths

Next Steps