{"action":"created","comment":{"url":"https://api.github.com/repos/arcturus/serviceworkerware/pulls/comments/26834893","id":26834893,"diff_hunk":"@@ -90,43 +111,73 @@ worker.get('virtual/.', function(request, response) {\n });\n ```\n \n-The output for any request that hits this url will be the original address of the url and a random number, with the headers that we specified in the response object.\n+The output for any request that hits this URL will be the original address of the URL, and a randomly generated number. Note how we can even specify the headers for our response!\n+\n+Remember that the handler *must always return a Promise*.\n+\n+### onMessage(?) TODO\n+### onBeforeEvicted(?) TODO\n+### onEvicted(?) TODO\n+\n \n-One important point is the fact that when you write a handler for using in your request, the function handling those requests *must return a promise*.\n+## Middleware examples\n \n-## Can I see some examples of middleware?\n+This package already incorporates two simple middlewares. They are available by default when you import it:\n \n-Right we added 2 simple middlewares to this package, one for precaching static content and a simple offline cache handler. They are available by default when you import this library.\n+TODO: I would suggest refactoring them away from this package","path":"README.md","position":145,"original_position":145,"commit_id":"3bc7e489d9c35570486069a0f90057b22309c0fe","original_commit_id":"3bc7e489d9c35570486069a0f90057b22309c0fe","user":{"login":"arcturus","id":60801,"avatar_url":"https://avatars.githubusercontent.com/u/60801?v=3","gravatar_id":"","url":"https://api.github.com/users/arcturus","html_url":"https://github.com/arcturus","followers_url":"https://api.github.com/users/arcturus/followers","following_url":"https://api.github.com/users/arcturus/following{/other_user}","gists_url":"https://api.github.com/users/arcturus/gists{/gist_id}","starred_url":"https://api.github.com/users/arcturus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcturus/subscriptions","organizations_url":"https://api.github.com/users/arcturus/orgs","repos_url":"https://api.github.com/users/arcturus/repos","events_url":"https://api.github.com/users/arcturus/events{/privacy}","received_events_url":"https://api.github.com/users/arcturus/received_events","type":"User","site_admin":false},"body":"Sounds good to me, did that with the cache helper.\r\n\r\nWill do it during the flight :P","created_at":"2015-03-20T12:10:48Z","updated_at":"2015-03-20T12:10:48Z","html_url":"https://github.com/arcturus/serviceworkerware/pull/6#discussion_r26834893","pull_request_url":"https://api.github.com/repos/arcturus/serviceworkerware/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/arcturus/serviceworkerware/pulls/comments/26834893"},"html":{"href":"https://github.com/arcturus/serviceworkerware/pull/6#discussion_r26834893"},"pull_request":{"href":"https://api.github.com/repos/arcturus/serviceworkerware/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/arcturus/serviceworkerware/pulls/6","id":31516744,"html_url":"https://github.com/arcturus/serviceworkerware/pull/6","diff_url":"https://github.com/arcturus/serviceworkerware/pull/6.diff","patch_url":"https://github.com/arcturus/serviceworkerware/pull/6.patch","issue_url":"https://api.github.com/repos/arcturus/serviceworkerware/issues/6","number":6,"state":"open","locked":false,"title":"simplify/clarify README.md","user":{"login":"sole","id":5609,"avatar_url":"https://avatars.githubusercontent.com/u/5609?v=3","gravatar_id":"","url":"https://api.github.com/users/sole","html_url":"https://github.com/sole","followers_url":"https://api.github.com/users/sole/followers","following_url":"https://api.github.com/users/sole/following{/other_user}","gists_url":"https://api.github.com/users/sole/gists{/gist_id}","starred_url":"https://api.github.com/users/sole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sole/subscriptions","organizations_url":"https://api.github.com/users/sole/orgs","repos_url":"https://api.github.com/users/sole/repos","events_url":"https://api.github.com/users/sole/events{/privacy}","received_events_url":"https://api.github.com/users/sole/received_events","type":"User","site_admin":false},"body":"I have copywritten this thing and also added a bunch of TODO where things are not clear or confusing\r\n\r\nLet me know what you think :P","created_at":"2015-03-19T12:01:08Z","updated_at":"2015-03-20T12:10:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4820b93dff08cc60bb095e2757d4c437a55bcecd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/arcturus/serviceworkerware/pulls/6/commits","review_comments_url":"https://api.github.com/repos/arcturus/serviceworkerware/pulls/6/comments","review_comment_url":"https://api.github.com/repos/arcturus/serviceworkerware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/arcturus/serviceworkerware/issues/6/comments","statuses_url":"https://api.github.com/repos/arcturus/serviceworkerware/statuses/3bc7e489d9c35570486069a0f90057b22309c0fe","head":{"label":"sole:master","ref":"master","sha":"3bc7e489d9c35570486069a0f90057b22309c0fe","user":{"login":"sole","id":5609,"avatar_url":"https://avatars.githubusercontent.com/u/5609?v=3","gravatar_id":"","url":"https://api.github.com/users/sole","html_url":"https://github.com/sole","followers_url":"https://api.github.com/users/sole/followers","following_url":"https://api.github.com/users/sole/following{/other_user}","gists_url":"https://api.github.com/users/sole/gists{/gist_id}","starred_url":"https://api.github.com/users/sole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sole/subscriptions","organizations_url":"https://api.github.com/users/sole/orgs","repos_url":"https://api.github.com/users/sole/repos","events_url":"https://api.github.com/users/sole/events{/privacy}","received_events_url":"https://api.github.com/users/sole/received_events","type":"User","site_admin":false},"repo":{"id":32474601,"name":"serviceworkerware","full_name":"sole/serviceworkerware","owner":{"login":"sole","id":5609,"avatar_url":"https://avatars.githubusercontent.com/u/5609?v=3","gravatar_id":"","url":"https://api.github.com/users/sole","html_url":"https://github.com/sole","followers_url":"https://api.github.com/users/sole/followers","following_url":"https://api.github.com/users/sole/following{/other_user}","gists_url":"https://api.github.com/users/sole/gists{/gist_id}","starred_url":"https://api.github.com/users/sole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sole/subscriptions","organizations_url":"https://api.github.com/users/sole/orgs","repos_url":"https://api.github.com/users/sole/repos","events_url":"https://api.github.com/users/sole/events{/privacy}","received_events_url":"https://api.github.com/users/sole/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sole/serviceworkerware","description":"","fork":true,"url":"https://api.github.com/repos/sole/serviceworkerware","forks_url":"https://api.github.com/repos/sole/serviceworkerware/forks","keys_url":"https://api.github.com/repos/sole/serviceworkerware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sole/serviceworkerware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sole/serviceworkerware/teams","hooks_url":"https://api.github.com/repos/sole/serviceworkerware/hooks","issue_events_url":"https://api.github.com/repos/sole/serviceworkerware/issues/events{/number}","events_url":"https://api.github.com/repos/sole/serviceworkerware/events","assignees_url":"https://api.github.com/repos/sole/serviceworkerware/assignees{/user}","branches_url":"https://api.github.com/repos/sole/serviceworkerware/branches{/branch}","tags_url":"https://api.github.com/repos/sole/serviceworkerware/tags","blobs_url":"https://api.github.com/repos/sole/serviceworkerware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sole/serviceworkerware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sole/serviceworkerware/git/refs{/sha}","trees_url":"https://api.github.com/repos/sole/serviceworkerware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sole/serviceworkerware/statuses/{sha}","languages_url":"https://api.github.com/repos/sole/serviceworkerware/languages","stargazers_url":"https://api.github.com/repos/sole/serviceworkerware/stargazers","contributors_url":"https://api.github.com/repos/sole/serviceworkerware/contributors","subscribers_url":"https://api.github.com/repos/sole/serviceworkerware/subscribers","subscription_url":"https://api.github.com/repos/sole/serviceworkerware/subscription","commits_url":"https://api.github.com/repos/sole/serviceworkerware/commits{/sha}","git_commits_url":"https://api.github.com/repos/sole/serviceworkerware/git/commits{/sha}","comments_url":"https://api.github.com/repos/sole/serviceworkerware/comments{/number}","issue_comment_url":"https://api.github.com/repos/sole/serviceworkerware/issues/comments{/number}","contents_url":"https://api.github.com/repos/sole/serviceworkerware/contents/{+path}","compare_url":"https://api.github.com/repos/sole/serviceworkerware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sole/serviceworkerware/merges","archive_url":"https://api.github.com/repos/sole/serviceworkerware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sole/serviceworkerware/downloads","issues_url":"https://api.github.com/repos/sole/serviceworkerware/issues{/number}","pulls_url":"https://api.github.com/repos/sole/serviceworkerware/pulls{/number}","milestones_url":"https://api.github.com/repos/sole/serviceworkerware/milestones{/number}","notifications_url":"https://api.github.com/repos/sole/serviceworkerware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sole/serviceworkerware/labels{/name}","releases_url":"https://api.github.com/repos/sole/serviceworkerware/releases{/id}","created_at":"2015-03-18T17:43:42Z","updated_at":"2015-03-19T11:57:14Z","pushed_at":"2015-03-19T11:57:14Z","git_url":"git://github.com/sole/serviceworkerware.git","ssh_url":"git@github.com:sole/serviceworkerware.git","clone_url":"https://github.com/sole/serviceworkerware.git","svn_url":"https://github.com/sole/serviceworkerware","homepage":null,"size":148,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"arcturus:master","ref":"master","sha":"2354025c1d406e64ab202e2e9a115a5e95f4bcc7","user":{"login":"arcturus","id":60801,"avatar_url":"https://avatars.githubusercontent.com/u/60801?v=3","gravatar_id":"","url":"https://api.github.com/users/arcturus","html_url":"https://github.com/arcturus","followers_url":"https://api.github.com/users/arcturus/followers","following_url":"https://api.github.com/users/arcturus/following{/other_user}","gists_url":"https://api.github.com/users/arcturus/gists{/gist_id}","starred_url":"https://api.github.com/users/arcturus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcturus/subscriptions","organizations_url":"https://api.github.com/users/arcturus/orgs","repos_url":"https://api.github.com/users/arcturus/repos","events_url":"https://api.github.com/users/arcturus/events{/privacy}","received_events_url":"https://api.github.com/users/arcturus/received_events","type":"User","site_admin":false},"repo":{"id":31429789,"name":"serviceworkerware","full_name":"arcturus/serviceworkerware","owner":{"login":"arcturus","id":60801,"avatar_url":"https://avatars.githubusercontent.com/u/60801?v=3","gravatar_id":"","url":"https://api.github.com/users/arcturus","html_url":"https://github.com/arcturus","followers_url":"https://api.github.com/users/arcturus/followers","following_url":"https://api.github.com/users/arcturus/following{/other_user}","gists_url":"https://api.github.com/users/arcturus/gists{/gist_id}","starred_url":"https://api.github.com/users/arcturus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcturus/subscriptions","organizations_url":"https://api.github.com/users/arcturus/orgs","repos_url":"https://api.github.com/users/arcturus/repos","events_url":"https://api.github.com/users/arcturus/events{/privacy}","received_events_url":"https://api.github.com/users/arcturus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arcturus/serviceworkerware","description":"","fork":false,"url":"https://api.github.com/repos/arcturus/serviceworkerware","forks_url":"https://api.github.com/repos/arcturus/serviceworkerware/forks","keys_url":"https://api.github.com/repos/arcturus/serviceworkerware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arcturus/serviceworkerware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arcturus/serviceworkerware/teams","hooks_url":"https://api.github.com/repos/arcturus/serviceworkerware/hooks","issue_events_url":"https://api.github.com/repos/arcturus/serviceworkerware/issues/events{/number}","events_url":"https://api.github.com/repos/arcturus/serviceworkerware/events","assignees_url":"https://api.github.com/repos/arcturus/serviceworkerware/assignees{/user}","branches_url":"https://api.github.com/repos/arcturus/serviceworkerware/branches{/branch}","tags_url":"https://api.github.com/repos/arcturus/serviceworkerware/tags","blobs_url":"https://api.github.com/repos/arcturus/serviceworkerware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arcturus/serviceworkerware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arcturus/serviceworkerware/git/refs{/sha}","trees_url":"https://api.github.com/repos/arcturus/serviceworkerware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arcturus/serviceworkerware/statuses/{sha}","languages_url":"https://api.github.com/repos/arcturus/serviceworkerware/languages","stargazers_url":"https://api.github.com/repos/arcturus/serviceworkerware/stargazers","contributors_url":"https://api.github.com/repos/arcturus/serviceworkerware/contributors","subscribers_url":"https://api.github.com/repos/arcturus/serviceworkerware/subscribers","subscription_url":"https://api.github.com/repos/arcturus/serviceworkerware/subscription","commits_url":"https://api.github.com/repos/arcturus/serviceworkerware/commits{/sha}","git_commits_url":"https://api.github.com/repos/arcturus/serviceworkerware/git/commits{/sha}","comments_url":"https://api.github.com/repos/arcturus/serviceworkerware/comments{/number}","issue_comment_url":"https://api.github.com/repos/arcturus/serviceworkerware/issues/comments{/number}","contents_url":"https://api.github.com/repos/arcturus/serviceworkerware/contents/{+path}","compare_url":"https://api.github.com/repos/arcturus/serviceworkerware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arcturus/serviceworkerware/merges","archive_url":"https://api.github.com/repos/arcturus/serviceworkerware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arcturus/serviceworkerware/downloads","issues_url":"https://api.github.com/repos/arcturus/serviceworkerware/issues{/number}","pulls_url":"https://api.github.com/repos/arcturus/serviceworkerware/pulls{/number}","milestones_url":"https://api.github.com/repos/arcturus/serviceworkerware/milestones{/number}","notifications_url":"https://api.github.com/repos/arcturus/serviceworkerware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arcturus/serviceworkerware/labels{/name}","releases_url":"https://api.github.com/repos/arcturus/serviceworkerware/releases{/id}","created_at":"2015-02-27T17:04:42Z","updated_at":"2015-03-19T12:43:14Z","pushed_at":"2015-03-20T09:07:04Z","git_url":"git://github.com/arcturus/serviceworkerware.git","ssh_url":"git@github.com:arcturus/serviceworkerware.git","clone_url":"https://github.com/arcturus/serviceworkerware.git","svn_url":"https://github.com/arcturus/serviceworkerware","homepage":null,"size":148,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/arcturus/serviceworkerware/pulls/6"},"html":{"href":"https://github.com/arcturus/serviceworkerware/pull/6"},"issue":{"href":"https://api.github.com/repos/arcturus/serviceworkerware/issues/6"},"comments":{"href":"https://api.github.com/repos/arcturus/serviceworkerware/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/arcturus/serviceworkerware/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/arcturus/serviceworkerware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/arcturus/serviceworkerware/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/arcturus/serviceworkerware/statuses/3bc7e489d9c35570486069a0f90057b22309c0fe"}}}}