Usage Examples
Practical examples to get you started with FakeURL in different scenarios
Return a 200 OK status with empty JSON
Simulate a 404 Not Found error
Simulate a 500 Internal Server Error
Add a 3 second delay to simulate slow network
Return 201 Created with custom JSON
URL:
https://fakeurl.dev/201?json={"id":123,"name":"New Item","created":true}
Use case:
Test POST request success responses
Return 401 Unauthorized
Return 422 Unprocessable Entity with error details
URL:
https://fakeurl.dev/422?json={"error":"Validation failed","fields":["email","password"]}
Use case:
Test form validation error handling
Return 429 Too Many Requests
Simulate paginated data
URL:
https://fakeurl.dev/200?json={"data":[{"id":1},{"id":2}],"page":1,"total":100,"hasMore":true}
Use case:
Test pagination logic
Return response with custom headers
URL:
https://fakeurl.dev/200?headers=X-Rate-Limit:100,X-Rate-Remaining:95
Use case:
Test header parsing and rate limit display
Combine Multiple Parameters
You can combine delay, JSON, and headers in a single URL
/200?delay=1000&json={"status":"ok"}&headers=X-Custom:Value
Test Different HTTP Methods
FakeURL supports GET, POST, PUT, DELETE, and OPTIONS methods
URL Encode JSON
Remember to URL encode complex JSON structures when using them in query parameters