{"action":"created","comment":{"url":"https://api.github.com/repos/cypress-io/cypress-documentation/pulls/comments/213724328","pull_request_review_id":150618768,"id":213724328,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzcyNDMyOA==","diff_hunk":"@@ -191,38 +191,14 @@ cy.route('POST', '**/comments', commentsResponse)\n \n Any request that matches the `method` and `url` of a route will be responded to based on the configuration of that route.\n \n-If a request doesn't match any route, {% urlHash \"it will automatically receive a 404\" Notes %}. For example, given we have the following routes:\n-\n-```javascript\n-cy.server()\n-cy.route('**/users', [\n-  {id: 19, name: 'Laura'},\n-  {id: 20, name: 'Jamie'}\n-])\n-cy.route('POST', '**/messages', {id: 123, message: 'Hi There!'})\n-cy.get('form').submit()\n-```\n-\n-```javascript\n-// Application Code\n-// when our form is submitted\n-$('form').submit(() => {\n-  // send an AJAX to: GET /users\n-  $.get('https://localhost:7777/users' )\n-\n-  // send an AJAX to: POST /messages\n-  $.post('https://localhost:7777/messages', {some: 'data'})\n-\n-  // send an AJAX to: GET /updates\n-  $.get('https://localhost:7777/updates')\n-})\n-```\n+{% note info %}\n+If a request doesn't match any route then the behavior depends on the value of the `force404` option on the {% url `cy.server()` server %}:\n \n-**The above application code will issue 3 AJAX requests:**\n+* if `force404` is `false` (the default) then the request will {% url 'pass through to the server' network-requests#Don’t-Stub-Responses %}.\n+* if `force404` is `true` then the response {% urlHash \"will be a 404\" Notes %}.\n \n-1. The `GET /users` will match our 1st route and respond with a `200` status code and the array of users.\n-2. The `POST /messages` will match our 2nd route and respond with a `200` status code with the message object.\n-3. The `GET /updates` did not match any routes and its response automatically sent back a `404` status code with an empty response body.\n+You can {% url 'read more about this behavior here.' server#Options %}\n+{% endnote %}","path":"source/api/commands/route.md","position":41,"original_position":41,"commit_id":"0a8a7abfa977797975511002269fc746a48fe7df","original_commit_id":"0a8a7abfa977797975511002269fc746a48fe7df","user":{"login":"jennifer-shehane","id":1271364,"node_id":"MDQ6VXNlcjEyNzEzNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1271364?v=4","gravatar_id":"","url":"https://api.github.com/users/jennifer-shehane","html_url":"https://github.com/jennifer-shehane","followers_url":"https://api.github.com/users/jennifer-shehane/followers","following_url":"https://api.github.com/users/jennifer-shehane/following{/other_user}","gists_url":"https://api.github.com/users/jennifer-shehane/gists{/gist_id}","starred_url":"https://api.github.com/users/jennifer-shehane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennifer-shehane/subscriptions","organizations_url":"https://api.github.com/users/jennifer-shehane/orgs","repos_url":"https://api.github.com/users/jennifer-shehane/repos","events_url":"https://api.github.com/users/jennifer-shehane/events{/privacy}","received_events_url":"https://api.github.com/users/jennifer-shehane/received_events","type":"User","site_admin":false},"body":"This is fine and a good use of a 'note' as it is outside of the flow of the content. ","created_at":"2018-08-29T15:25:17Z","updated_at":"2018-08-29T15:27:11Z","html_url":"https://github.com/cypress-io/cypress-documentation/pull/876#discussion_r213724328","pull_request_url":"https://api.github.com/repos/cypress-io/cypress-documentation/pulls/876","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/cypress-io/cypress-documentation/pulls/comments/213724328"},"html":{"href":"https://github.com/cypress-io/cypress-documentation/pull/876#discussion_r213724328"},"pull_request":{"href":"https://api.github.com/repos/cypress-io/cypress-documentation/pulls/876"}},"in_reply_to_id":213642723},"pull_request":{"url":"https://api.github.com/repos/cypress-io/cypress-documentation/pulls/876","id":211690185,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExNjkwMTg1","html_url":"https://github.com/cypress-io/cypress-documentation/pull/876","diff_url":"https://github.com/cypress-io/cypress-documentation/pull/876.diff","patch_url":"https://github.com/cypress-io/cypress-documentation/pull/876.patch","issue_url":"https://api.github.com/repos/cypress-io/cypress-documentation/issues/876","number":876,"state":"open","locked":false,"title":"[#564] Tighten docs around force404 behaviour","user":{"login":"richdouglasevans","id":1855109,"node_id":"MDQ6VXNlcjE4NTUxMDk=","avatar_url":"https://avatars1.githubusercontent.com/u/1855109?v=4","gravatar_id":"","url":"https://api.github.com/users/richdouglasevans","html_url":"https://github.com/richdouglasevans","followers_url":"https://api.github.com/users/richdouglasevans/followers","following_url":"https://api.github.com/users/richdouglasevans/following{/other_user}","gists_url":"https://api.github.com/users/richdouglasevans/gists{/gist_id}","starred_url":"https://api.github.com/users/richdouglasevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richdouglasevans/subscriptions","organizations_url":"https://api.github.com/users/richdouglasevans/orgs","repos_url":"https://api.github.com/users/richdouglasevans/repos","events_url":"https://api.github.com/users/richdouglasevans/events{/privacy}","received_events_url":"https://api.github.com/users/richdouglasevans/received_events","type":"User","site_admin":false},"body":"closes #564\r\n\r\n> This change isn't as trivial as I thought originally 'cos there are a few places in the docs that have \"incorrect\" info. I'm scare quoting there because I'm now doubting my own understanding of the behaviour in light of the docs: I'm writing some (more) tests to prove the behaviour.\r\n\r\nI verified the behaviour locally: routes that are _not_ matched will, by default, just pass through to the server.\r\n\r\n<img width=\"783\" alt=\"screen shot 2018-08-29 at 10 38 54\" src=\"https://user-images.githubusercontent.com/1855109/44780209-54638180-ab79-11e8-82c7-c55fc7760c56.png\">\r\n","created_at":"2018-08-29T09:41:02Z","updated_at":"2018-08-29T15:27:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4827e8919862426f05d3952eaf99d7b5b48b8c5d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cypress-io/cypress-documentation/pulls/876/commits","review_comments_url":"https://api.github.com/repos/cypress-io/cypress-documentation/pulls/876/comments","review_comment_url":"https://api.github.com/repos/cypress-io/cypress-documentation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cypress-io/cypress-documentation/issues/876/comments","statuses_url":"https://api.github.com/repos/cypress-io/cypress-documentation/statuses/0a8a7abfa977797975511002269fc746a48fe7df","head":{"label":"richdouglasevans:issue/564-server-force404","ref":"issue/564-server-force404","sha":"0a8a7abfa977797975511002269fc746a48fe7df","user":{"login":"richdouglasevans","id":1855109,"node_id":"MDQ6VXNlcjE4NTUxMDk=","avatar_url":"https://avatars1.githubusercontent.com/u/1855109?v=4","gravatar_id":"","url":"https://api.github.com/users/richdouglasevans","html_url":"https://github.com/richdouglasevans","followers_url":"https://api.github.com/users/richdouglasevans/followers","following_url":"https://api.github.com/users/richdouglasevans/following{/other_user}","gists_url":"https://api.github.com/users/richdouglasevans/gists{/gist_id}","starred_url":"https://api.github.com/users/richdouglasevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richdouglasevans/subscriptions","organizations_url":"https://api.github.com/users/richdouglasevans/orgs","repos_url":"https://api.github.com/users/richdouglasevans/repos","events_url":"https://api.github.com/users/richdouglasevans/events{/privacy}","received_events_url":"https://api.github.com/users/richdouglasevans/received_events","type":"User","site_admin":false},"repo":{"id":142286820,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIyODY4MjA=","name":"cypress-documentation","full_name":"richdouglasevans/cypress-documentation","owner":{"login":"richdouglasevans","id":1855109,"node_id":"MDQ6VXNlcjE4NTUxMDk=","avatar_url":"https://avatars1.githubusercontent.com/u/1855109?v=4","gravatar_id":"","url":"https://api.github.com/users/richdouglasevans","html_url":"https://github.com/richdouglasevans","followers_url":"https://api.github.com/users/richdouglasevans/followers","following_url":"https://api.github.com/users/richdouglasevans/following{/other_user}","gists_url":"https://api.github.com/users/richdouglasevans/gists{/gist_id}","starred_url":"https://api.github.com/users/richdouglasevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richdouglasevans/subscriptions","organizations_url":"https://api.github.com/users/richdouglasevans/orgs","repos_url":"https://api.github.com/users/richdouglasevans/repos","events_url":"https://api.github.com/users/richdouglasevans/events{/privacy}","received_events_url":"https://api.github.com/users/richdouglasevans/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/richdouglasevans/cypress-documentation","description":"Cypress Documentation including Guides, API, Plugins, Examples, & FAQ.","fork":true,"url":"https://api.github.com/repos/richdouglasevans/cypress-documentation","forks_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/forks","keys_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/teams","hooks_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/hooks","issue_events_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/issues/events{/number}","events_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/events","assignees_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/assignees{/user}","branches_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/branches{/branch}","tags_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/tags","blobs_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/languages","stargazers_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/stargazers","contributors_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/contributors","subscribers_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/subscribers","subscription_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/subscription","commits_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/contents/{+path}","compare_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/merges","archive_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/downloads","issues_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/issues{/number}","pulls_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/labels{/name}","releases_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/releases{/id}","deployments_url":"https://api.github.com/repos/richdouglasevans/cypress-documentation/deployments","created_at":"2018-07-25T10:47:41Z","updated_at":"2018-08-29T05:06:49Z","pushed_at":"2018-08-29T11:36:01Z","git_url":"git://github.com/richdouglasevans/cypress-documentation.git","ssh_url":"git@github.com:richdouglasevans/cypress-documentation.git","clone_url":"https://github.com/richdouglasevans/cypress-documentation.git","svn_url":"https://github.com/richdouglasevans/cypress-documentation","homepage":"http://docs.cypress.io","size":284940,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"cypress-io:develop","ref":"develop","sha":"87792b6ac1568732f023da2aebae64a31b018b63","user":{"login":"cypress-io","id":8908513,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg5MDg1MTM=","avatar_url":"https://avatars3.githubusercontent.com/u/8908513?v=4","gravatar_id":"","url":"https://api.github.com/users/cypress-io","html_url":"https://github.com/cypress-io","followers_url":"https://api.github.com/users/cypress-io/followers","following_url":"https://api.github.com/users/cypress-io/following{/other_user}","gists_url":"https://api.github.com/users/cypress-io/gists{/gist_id}","starred_url":"https://api.github.com/users/cypress-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cypress-io/subscriptions","organizations_url":"https://api.github.com/users/cypress-io/orgs","repos_url":"https://api.github.com/users/cypress-io/repos","events_url":"https://api.github.com/users/cypress-io/events{/privacy}","received_events_url":"https://api.github.com/users/cypress-io/received_events","type":"Organization","site_admin":false},"repo":{"id":49402470,"node_id":"MDEwOlJlcG9zaXRvcnk0OTQwMjQ3MA==","name":"cypress-documentation","full_name":"cypress-io/cypress-documentation","owner":{"login":"cypress-io","id":8908513,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg5MDg1MTM=","avatar_url":"https://avatars3.githubusercontent.com/u/8908513?v=4","gravatar_id":"","url":"https://api.github.com/users/cypress-io","html_url":"https://github.com/cypress-io","followers_url":"https://api.github.com/users/cypress-io/followers","following_url":"https://api.github.com/users/cypress-io/following{/other_user}","gists_url":"https://api.github.com/users/cypress-io/gists{/gist_id}","starred_url":"https://api.github.com/users/cypress-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cypress-io/subscriptions","organizations_url":"https://api.github.com/users/cypress-io/orgs","repos_url":"https://api.github.com/users/cypress-io/repos","events_url":"https://api.github.com/users/cypress-io/events{/privacy}","received_events_url":"https://api.github.com/users/cypress-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cypress-io/cypress-documentation","description":"Cypress Documentation including Guides, API, Plugins, Examples, & FAQ.","fork":false,"url":"https://api.github.com/repos/cypress-io/cypress-documentation","forks_url":"https://api.github.com/repos/cypress-io/cypress-documentation/forks","keys_url":"https://api.github.com/repos/cypress-io/cypress-documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cypress-io/cypress-documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cypress-io/cypress-documentation/teams","hooks_url":"https://api.github.com/repos/cypress-io/cypress-documentation/hooks","issue_events_url":"https://api.github.com/repos/cypress-io/cypress-documentation/issues/events{/number}","events_url":"https://api.github.com/repos/cypress-io/cypress-documentation/events","assignees_url":"https://api.github.com/repos/cypress-io/cypress-documentation/assignees{/user}","branches_url":"https://api.github.com/repos/cypress-io/cypress-documentation/branches{/branch}","tags_url":"https://api.github.com/repos/cypress-io/cypress-documentation/tags","blobs_url":"https://api.github.com/repos/cypress-io/cypress-documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cypress-io/cypress-documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cypress-io/cypress-documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/cypress-io/cypress-documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cypress-io/cypress-documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/cypress-io/cypress-documentation/languages","stargazers_url":"https://api.github.com/repos/cypress-io/cypress-documentation/stargazers","contributors_url":"https://api.github.com/repos/cypress-io/cypress-documentation/contributors","subscribers_url":"https://api.github.com/repos/cypress-io/cypress-documentation/subscribers","subscription_url":"https://api.github.com/repos/cypress-io/cypress-documentation/subscription","commits_url":"https://api.github.com/repos/cypress-io/cypress-documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/cypress-io/cypress-documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/cypress-io/cypress-documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/cypress-io/cypress-documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/cypress-io/cypress-documentation/contents/{+path}","compare_url":"https://api.github.com/repos/cypress-io/cypress-documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cypress-io/cypress-documentation/merges","archive_url":"https://api.github.com/repos/cypress-io/cypress-documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cypress-io/cypress-documentation/downloads","issues_url":"https://api.github.com/repos/cypress-io/cypress-documentation/issues{/number}","pulls_url":"https://api.github.com/repos/cypress-io/cypress-documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/cypress-io/cypress-documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/cypress-io/cypress-documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cypress-io/cypress-documentation/labels{/name}","releases_url":"https://api.github.com/repos/cypress-io/cypress-documentation/releases{/id}","deployments_url":"https://api.github.com/repos/cypress-io/cypress-documentation/deployments","created_at":"2016-01-11T04:40:50Z","updated_at":"2018-08-29T15:23:35Z","pushed_at":"2018-08-29T15:23:30Z","git_url":"git://github.com/cypress-io/cypress-documentation.git","ssh_url":"git@github.com:cypress-io/cypress-documentation.git","clone_url":"https://github.com/cypress-io/cypress-documentation.git","svn_url":"https://github.com/cypress-io/cypress-documentation","homepage":"http://docs.cypress.io","size":285453,"stargazers_count":50,"watchers_count":50,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":139,"mirror_url":null,"archived":false,"open_issues_count":116,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":139,"open_issues":116,"watchers":50,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/cypress-io/cypress-documentation/pulls/876"},"html":{"href":"https://github.com/cypress-io/cypress-documentation/pull/876"},"issue":{"href":"https://api.github.com/repos/cypress-io/cypress-documentation/issues/876"},"comments":{"href":"https://api.github.com/repos/cypress-io/cypress-documentation/issues/876/comments"},"review_comments":{"href":"https://api.github.com/repos/cypress-io/cypress-documentation/pulls/876/comments"},"review_comment":{"href":"https://api.github.com/repos/cypress-io/cypress-documentation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cypress-io/cypress-documentation/pulls/876/commits"},"statuses":{"href":"https://api.github.com/repos/cypress-io/cypress-documentation/statuses/0a8a7abfa977797975511002269fc746a48fe7df"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jennifer-shehane"}}