You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
888 B

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. {
  2. "mocks": [
  3. {
  4. "route": "/",
  5. "response": {
  6. "body": "<h1>Welcome to the Mock Responses example</h1>"
  7. }
  8. },
  9. {
  10. "route": "/two",
  11. "request": { "accepts": "xml" },
  12. "response": {
  13. "body": "<result id='2' name='whatever' />"
  14. }
  15. },
  16. {
  17. "route": "/three",
  18. "responses": [
  19. {
  20. "request": { "method": "GET" },
  21. "response": {
  22. "body": "<h1>Mock response for 'GET' request on /three</h1>"
  23. }
  24. },
  25. {
  26. "request": { "method": "POST" },
  27. "response": {
  28. "status": 400,
  29. "body": { "message": "That method is not allowed." }
  30. }
  31. }
  32. ]
  33. },
  34. {
  35. "route": "/four",
  36. "module": "/mocks/four.js"
  37. },
  38. {
  39. "route": "/five/:id\\?name=:name",
  40. "module": "/mocks/five.js"
  41. }
  42. ]
  43. }