freshroute-server
Version:
Local development server for FreshRoute extension with API mocking and extended functionality
101 lines • 2.9 kB
JSON
[
{
"id": "default_users_api",
"name": "Users API - Get All Users",
"enabled": true,
"method": "GET",
"urlPattern": "https://jsonplaceholder.typicode.com/users",
"responseType": "file",
"responseFile": "users.json",
"statusCode": 200,
"delay": 0,
"responseHeaders": {
"Content-Type": "application/json",
"X-Mock-Server": "FreshRoute",
"X-Response-Time": "50ms"
},
"description": "Mock response for users API with realistic user data",
"createdAt": "2024-01-20T12:00:00Z"
},
{
"id": "default_server_error",
"name": "Server Error Simulation",
"enabled": false,
"method": "GET",
"urlPattern": "https://api.example.com/error-test",
"responseType": "file",
"responseFile": "error-500.json",
"statusCode": 500,
"delay": 2000,
"responseHeaders": {
"Content-Type": "application/json",
"X-Mock-Server": "FreshRoute",
"X-Error-Type": "simulated"
},
"description": "Simulate server errors for testing error handling",
"createdAt": "2024-01-20T12:00:00Z"
},
{
"id": "default_slow_api",
"name": "Slow API Response",
"enabled": false,
"method": "GET",
"urlPattern": "https://api.example.com/slow-endpoint",
"responseType": "json",
"responseBody": {
"message": "This response was delayed by 5 seconds",
"timestamp": "2024-01-20T12:00:00Z",
"delay": "5000ms"
},
"statusCode": 200,
"delay": 5000,
"responseHeaders": {
"Content-Type": "application/json",
"X-Mock-Server": "FreshRoute",
"X-Simulated-Delay": "5000ms"
},
"description": "Test slow network conditions and loading states",
"createdAt": "2024-01-20T12:00:00Z"
},
{
"id": "default_xml_api",
"name": "XML Products API",
"enabled": false,
"method": "GET",
"urlPattern": "https://api.example.com/products.xml",
"responseType": "file",
"responseFile": "products.xml",
"statusCode": 200,
"delay": 0,
"responseHeaders": {
"Content-Type": "application/xml",
"X-Mock-Server": "FreshRoute"
},
"description": "Mock XML response for testing different content types",
"createdAt": "2024-01-20T12:00:00Z"
},
{
"id": "default_post_api",
"name": "Create User API",
"enabled": false,
"method": "POST",
"urlPattern": "https://api.example.com/users",
"responseType": "json",
"responseBody": {
"id": 999,
"name": "New User",
"email": "newuser@example.com",
"status": "created",
"timestamp": "2024-01-20T12:00:00Z"
},
"statusCode": 201,
"delay": 500,
"responseHeaders": {
"Content-Type": "application/json",
"Location": "/users/999",
"X-Mock-Server": "FreshRoute"
},
"description": "Mock POST request for user creation",
"createdAt": "2024-01-20T12:00:00Z"
}
]