Overview

This page documents the Mock Server feature of Request Man.

Mock Server Running Server Configuration Port 3000 Host localhost Base Path /api/v1 Response Delay (ms) 100 Stop Server Restart SERVER URL http://localhost:3000/api/v1 Mock Endpoints + Add Endpoint GET /users Status: 200 | Response: JSON Array Returns list of users POST /users Status: 201 | Response: JSON Object Creates a new user PUT /users/:id Status: 200 | Response: JSON Object Updates user by ID DELETE /users/:id Status: 204 | Response: No Content Deletes user by ID
Documentation in Progress: Full documentation for this feature coming soon!

Key Features

The Mock Server feature provides powerful capabilities for API testing and development.

📝 Custom Responses Define custom JSON responses Set HTTP status codes Add custom headers {"status": "success"} 🔄 Dynamic Data Generate random data Use variables in responses Support for faker.js {{$randomName}} ⏱️ Delay Simulation Simulate network latency Random delay ranges Per-endpoint delays Delay: 100-500ms 🎯 Request Matching Match by URL patterns Query parameter matching Header-based routing /api/users/:id ⚠️ Error Scenarios Test error handling Random failures Custom error responses Status: 500 Error 📊 Request Logging View all incoming requests Inspect headers & body Export logs 127 requests logged

Getting Started

Access the Feature

Navigate to Mock Server in the Request Man interface.

Configure Settings

Set up your Mock Server preferences.

Start Using

Begin using Mock Server in your API workflows!

Mock Server Running SERVER URL http://localhost:3000 Create New Endpoint Method GET Path /api/products Status Code 200 Response Body [{"id": 1, "name": "Product"}] + Create Test Request GET localhost:3000/api/products Send Response 200 OK 105 ms [ { "id" : 1, "name" : "Product" , "price" : 29.99 } ] ? Mock working perfectly!

Examples

Here are practical examples of using Mock Server:

Example: E-Commerce API Mock Mock Endpoints Configuration GET /api/products { "products": [{ "id": 1, "name": "Laptop" }] } POST /api/orders { "order": { "id": "{{$guid}}", "status": "created" } } GET /api/orders/:id { "id": ":id" , "status": "shipped" , "delay": 200 } DELETE /api/orders/:id { "error": "Not Found" , "status": 404 } Testing Results MOCK SERVER RUNNING http://localhost:3000 Recent Requests GET /api/products 200 OK Returned: 15 products • Time: 105ms 2s ago POST /api/orders 201 Created: Order #abc-123 • Time: 98ms 5s ago GET /api/orders/abc-123 200 OK Status: shipped • Time: 205ms (with delay) 8s ago DELETE /api/orders/999 404 Error: Order not found • Time: 52ms 12s ago Mock Server Statistics Total Requests 247 Avg Response Time 127ms

Tips & Best Practices

Tip 1

Learn the keyboard shortcuts for faster workflow.

Tip 2

Use variables for flexibility across environments.

Tip 3

Save and organize your work in collections.

Tip 4

Check the console for detailed logging information.