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
- Select or create a collection
- Click "New Request"
- Configure the request components
- 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}}
Headers
Headers provide metadata about the request:
Common Headers
Content-Type: Specify request body formatAccept: Specify desired response formatAuthorization: Authentication credentialsUser-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:
- Click "Save"
- Provide a name
- Choose a collection
Request Variables
Use variables to make requests dynamic and reusable:
{
"email": "{{userEmail}}",
"environment": "{{env}}"
}
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
- Learn about Environments for managing variables
- Build Conduits to chain requests together
- Explore Authentication configurations →