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.

54 lines
1.1 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
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": "/one",
  11. "response": {
  12. "type": "text/plain",
  13. "body": "<h1>Welcome to the Mock Responses example</h1>"
  14. }
  15. },
  16. {
  17. "route": "/two",
  18. "request": { "accepts": "xml" },
  19. "response": {
  20. "body": "<result id='2' name='whatever' />"
  21. }
  22. },
  23. {
  24. "route": "/three",
  25. "responses": [
  26. {
  27. "request": { "method": "GET" },
  28. "response": {
  29. "body": "<h1>Mock response for 'GET' request on /three</h1>"
  30. }
  31. },
  32. {
  33. "request": { "method": "POST" },
  34. "response": {
  35. "status": 400,
  36. "body": { "message": "That method is not allowed." }
  37. }
  38. }
  39. ]
  40. },
  41. {
  42. "route": "/four",
  43. "module": "/mocks/stream-self.js"
  44. },
  45. {
  46. "route": "/five/:id",
  47. "module": "/mocks/five.js"
  48. },
  49. {
  50. "route": "/users",
  51. "module": "/mocks/users.js"
  52. }
  53. ]
  54. }