{"action":"created","comment":{"url":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls/comments/181662126","pull_request_review_id":112325472,"id":181662126,"diff_hunk":"@@ -165,4 +165,21 @@ class TeapotTests: XCTestCase {\n \n         self.waitForExpectations(timeout: 20.0)\n     }\n+\n+    func testCancelRequest() {\n+        let expectation = self.expectation(description: \"Get\")\n+\n+        let task = self.teapot?.get(\"/get\") { (result: NetworkResult) in\n+            XCTFail() // we're cancelling the task, it should never complete.\n+        }\n+\n+        task?.cancel()\n+\n+        DispatchQueue.main.asyncAfter(deadline: .now() + 15.0) {\n+            // we wait 15s, to be sure that the request is never completed.","path":"TeapotTests/TeapotTests.swift","position":null,"original_position":15,"commit_id":"3c6c002a0728d616a00156447b70d6c33dae1a7a","original_commit_id":"df5401705ea96b5b0c09ea59c9bf9e1adde348e0","user":{"login":"Elland","id":54423,"avatar_url":"https://avatars3.githubusercontent.com/u/54423?v=4","gravatar_id":"","url":"https://api.github.com/users/Elland","html_url":"https://github.com/Elland","followers_url":"https://api.github.com/users/Elland/followers","following_url":"https://api.github.com/users/Elland/following{/other_user}","gists_url":"https://api.github.com/users/Elland/gists{/gist_id}","starred_url":"https://api.github.com/users/Elland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elland/subscriptions","organizations_url":"https://api.github.com/users/Elland/orgs","repos_url":"https://api.github.com/users/Elland/repos","events_url":"https://api.github.com/users/Elland/events{/privacy}","received_events_url":"https://api.github.com/users/Elland/received_events","type":"User","site_admin":false},"body":"Much nicer now!\r\n","created_at":"2018-04-16T08:47:53Z","updated_at":"2018-04-16T08:47:54Z","html_url":"https://github.com/bakkenbaeck/Teapot/pull/27#discussion_r181662126","pull_request_url":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls/27","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls/comments/181662126"},"html":{"href":"https://github.com/bakkenbaeck/Teapot/pull/27#discussion_r181662126"},"pull_request":{"href":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls/27"}},"in_reply_to_id":181650189},"pull_request":{"url":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls/27","id":181452448,"html_url":"https://github.com/bakkenbaeck/Teapot/pull/27","diff_url":"https://github.com/bakkenbaeck/Teapot/pull/27.diff","patch_url":"https://github.com/bakkenbaeck/Teapot/pull/27.patch","issue_url":"https://api.github.com/repos/bakkenbaeck/Teapot/issues/27","number":27,"state":"open","locked":false,"title":"Added ability to control URLSessionTask.","user":{"login":"Elland","id":54423,"avatar_url":"https://avatars3.githubusercontent.com/u/54423?v=4","gravatar_id":"","url":"https://api.github.com/users/Elland","html_url":"https://github.com/Elland","followers_url":"https://api.github.com/users/Elland/followers","following_url":"https://api.github.com/users/Elland/following{/other_user}","gists_url":"https://api.github.com/users/Elland/gists{/gist_id}","starred_url":"https://api.github.com/users/Elland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elland/subscriptions","organizations_url":"https://api.github.com/users/Elland/orgs","repos_url":"https://api.github.com/users/Elland/repos","events_url":"https://api.github.com/users/Elland/events{/privacy}","received_events_url":"https://api.github.com/users/Elland/received_events","type":"User","site_admin":false},"body":"Cancel, suspend, resume, check stats, progress and much more!","created_at":"2018-04-13T10:49:58Z","updated_at":"2018-04-16T08:47:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8fcb8e7f9b52f97b22f969abce2b6c6ae4f5bb3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls/27/commits","review_comments_url":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls/27/comments","review_comment_url":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bakkenbaeck/Teapot/issues/27/comments","statuses_url":"https://api.github.com/repos/bakkenbaeck/Teapot/statuses/3c6c002a0728d616a00156447b70d6c33dae1a7a","head":{"label":"bakkenbaeck:cancel-request","ref":"cancel-request","sha":"3c6c002a0728d616a00156447b70d6c33dae1a7a","user":{"login":"bakkenbaeck","id":2485680,"avatar_url":"https://avatars3.githubusercontent.com/u/2485680?v=4","gravatar_id":"","url":"https://api.github.com/users/bakkenbaeck","html_url":"https://github.com/bakkenbaeck","followers_url":"https://api.github.com/users/bakkenbaeck/followers","following_url":"https://api.github.com/users/bakkenbaeck/following{/other_user}","gists_url":"https://api.github.com/users/bakkenbaeck/gists{/gist_id}","starred_url":"https://api.github.com/users/bakkenbaeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakkenbaeck/subscriptions","organizations_url":"https://api.github.com/users/bakkenbaeck/orgs","repos_url":"https://api.github.com/users/bakkenbaeck/repos","events_url":"https://api.github.com/users/bakkenbaeck/events{/privacy}","received_events_url":"https://api.github.com/users/bakkenbaeck/received_events","type":"Organization","site_admin":false},"repo":{"id":80127340,"name":"Teapot","full_name":"bakkenbaeck/Teapot","owner":{"login":"bakkenbaeck","id":2485680,"avatar_url":"https://avatars3.githubusercontent.com/u/2485680?v=4","gravatar_id":"","url":"https://api.github.com/users/bakkenbaeck","html_url":"https://github.com/bakkenbaeck","followers_url":"https://api.github.com/users/bakkenbaeck/followers","following_url":"https://api.github.com/users/bakkenbaeck/following{/other_user}","gists_url":"https://api.github.com/users/bakkenbaeck/gists{/gist_id}","starred_url":"https://api.github.com/users/bakkenbaeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakkenbaeck/subscriptions","organizations_url":"https://api.github.com/users/bakkenbaeck/orgs","repos_url":"https://api.github.com/users/bakkenbaeck/repos","events_url":"https://api.github.com/users/bakkenbaeck/events{/privacy}","received_events_url":"https://api.github.com/users/bakkenbaeck/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bakkenbaeck/Teapot","description":"A light-weight URLSession wrapper for building simple API clients.","fork":false,"url":"https://api.github.com/repos/bakkenbaeck/Teapot","forks_url":"https://api.github.com/repos/bakkenbaeck/Teapot/forks","keys_url":"https://api.github.com/repos/bakkenbaeck/Teapot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bakkenbaeck/Teapot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bakkenbaeck/Teapot/teams","hooks_url":"https://api.github.com/repos/bakkenbaeck/Teapot/hooks","issue_events_url":"https://api.github.com/repos/bakkenbaeck/Teapot/issues/events{/number}","events_url":"https://api.github.com/repos/bakkenbaeck/Teapot/events","assignees_url":"https://api.github.com/repos/bakkenbaeck/Teapot/assignees{/user}","branches_url":"https://api.github.com/repos/bakkenbaeck/Teapot/branches{/branch}","tags_url":"https://api.github.com/repos/bakkenbaeck/Teapot/tags","blobs_url":"https://api.github.com/repos/bakkenbaeck/Teapot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bakkenbaeck/Teapot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bakkenbaeck/Teapot/git/refs{/sha}","trees_url":"https://api.github.com/repos/bakkenbaeck/Teapot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bakkenbaeck/Teapot/statuses/{sha}","languages_url":"https://api.github.com/repos/bakkenbaeck/Teapot/languages","stargazers_url":"https://api.github.com/repos/bakkenbaeck/Teapot/stargazers","contributors_url":"https://api.github.com/repos/bakkenbaeck/Teapot/contributors","subscribers_url":"https://api.github.com/repos/bakkenbaeck/Teapot/subscribers","subscription_url":"https://api.github.com/repos/bakkenbaeck/Teapot/subscription","commits_url":"https://api.github.com/repos/bakkenbaeck/Teapot/commits{/sha}","git_commits_url":"https://api.github.com/repos/bakkenbaeck/Teapot/git/commits{/sha}","comments_url":"https://api.github.com/repos/bakkenbaeck/Teapot/comments{/number}","issue_comment_url":"https://api.github.com/repos/bakkenbaeck/Teapot/issues/comments{/number}","contents_url":"https://api.github.com/repos/bakkenbaeck/Teapot/contents/{+path}","compare_url":"https://api.github.com/repos/bakkenbaeck/Teapot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bakkenbaeck/Teapot/merges","archive_url":"https://api.github.com/repos/bakkenbaeck/Teapot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bakkenbaeck/Teapot/downloads","issues_url":"https://api.github.com/repos/bakkenbaeck/Teapot/issues{/number}","pulls_url":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls{/number}","milestones_url":"https://api.github.com/repos/bakkenbaeck/Teapot/milestones{/number}","notifications_url":"https://api.github.com/repos/bakkenbaeck/Teapot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bakkenbaeck/Teapot/labels{/name}","releases_url":"https://api.github.com/repos/bakkenbaeck/Teapot/releases{/id}","deployments_url":"https://api.github.com/repos/bakkenbaeck/Teapot/deployments","created_at":"2017-01-26T15:35:09Z","updated_at":"2017-12-29T15:58:42Z","pushed_at":"2018-04-16T08:47:49Z","git_url":"git://github.com/bakkenbaeck/Teapot.git","ssh_url":"git@github.com:bakkenbaeck/Teapot.git","clone_url":"https://github.com/bakkenbaeck/Teapot.git","svn_url":"https://github.com/bakkenbaeck/Teapot","homepage":null,"size":185,"stargazers_count":4,"watchers_count":4,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":4,"default_branch":"master"}},"base":{"label":"bakkenbaeck:master","ref":"master","sha":"5919b6f7d608e96161b19ffdaf36e9e30b4d36fa","user":{"login":"bakkenbaeck","id":2485680,"avatar_url":"https://avatars3.githubusercontent.com/u/2485680?v=4","gravatar_id":"","url":"https://api.github.com/users/bakkenbaeck","html_url":"https://github.com/bakkenbaeck","followers_url":"https://api.github.com/users/bakkenbaeck/followers","following_url":"https://api.github.com/users/bakkenbaeck/following{/other_user}","gists_url":"https://api.github.com/users/bakkenbaeck/gists{/gist_id}","starred_url":"https://api.github.com/users/bakkenbaeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakkenbaeck/subscriptions","organizations_url":"https://api.github.com/users/bakkenbaeck/orgs","repos_url":"https://api.github.com/users/bakkenbaeck/repos","events_url":"https://api.github.com/users/bakkenbaeck/events{/privacy}","received_events_url":"https://api.github.com/users/bakkenbaeck/received_events","type":"Organization","site_admin":false},"repo":{"id":80127340,"name":"Teapot","full_name":"bakkenbaeck/Teapot","owner":{"login":"bakkenbaeck","id":2485680,"avatar_url":"https://avatars3.githubusercontent.com/u/2485680?v=4","gravatar_id":"","url":"https://api.github.com/users/bakkenbaeck","html_url":"https://github.com/bakkenbaeck","followers_url":"https://api.github.com/users/bakkenbaeck/followers","following_url":"https://api.github.com/users/bakkenbaeck/following{/other_user}","gists_url":"https://api.github.com/users/bakkenbaeck/gists{/gist_id}","starred_url":"https://api.github.com/users/bakkenbaeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakkenbaeck/subscriptions","organizations_url":"https://api.github.com/users/bakkenbaeck/orgs","repos_url":"https://api.github.com/users/bakkenbaeck/repos","events_url":"https://api.github.com/users/bakkenbaeck/events{/privacy}","received_events_url":"https://api.github.com/users/bakkenbaeck/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bakkenbaeck/Teapot","description":"A light-weight URLSession wrapper for building simple API clients.","fork":false,"url":"https://api.github.com/repos/bakkenbaeck/Teapot","forks_url":"https://api.github.com/repos/bakkenbaeck/Teapot/forks","keys_url":"https://api.github.com/repos/bakkenbaeck/Teapot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bakkenbaeck/Teapot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bakkenbaeck/Teapot/teams","hooks_url":"https://api.github.com/repos/bakkenbaeck/Teapot/hooks","issue_events_url":"https://api.github.com/repos/bakkenbaeck/Teapot/issues/events{/number}","events_url":"https://api.github.com/repos/bakkenbaeck/Teapot/events","assignees_url":"https://api.github.com/repos/bakkenbaeck/Teapot/assignees{/user}","branches_url":"https://api.github.com/repos/bakkenbaeck/Teapot/branches{/branch}","tags_url":"https://api.github.com/repos/bakkenbaeck/Teapot/tags","blobs_url":"https://api.github.com/repos/bakkenbaeck/Teapot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bakkenbaeck/Teapot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bakkenbaeck/Teapot/git/refs{/sha}","trees_url":"https://api.github.com/repos/bakkenbaeck/Teapot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bakkenbaeck/Teapot/statuses/{sha}","languages_url":"https://api.github.com/repos/bakkenbaeck/Teapot/languages","stargazers_url":"https://api.github.com/repos/bakkenbaeck/Teapot/stargazers","contributors_url":"https://api.github.com/repos/bakkenbaeck/Teapot/contributors","subscribers_url":"https://api.github.com/repos/bakkenbaeck/Teapot/subscribers","subscription_url":"https://api.github.com/repos/bakkenbaeck/Teapot/subscription","commits_url":"https://api.github.com/repos/bakkenbaeck/Teapot/commits{/sha}","git_commits_url":"https://api.github.com/repos/bakkenbaeck/Teapot/git/commits{/sha}","comments_url":"https://api.github.com/repos/bakkenbaeck/Teapot/comments{/number}","issue_comment_url":"https://api.github.com/repos/bakkenbaeck/Teapot/issues/comments{/number}","contents_url":"https://api.github.com/repos/bakkenbaeck/Teapot/contents/{+path}","compare_url":"https://api.github.com/repos/bakkenbaeck/Teapot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bakkenbaeck/Teapot/merges","archive_url":"https://api.github.com/repos/bakkenbaeck/Teapot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bakkenbaeck/Teapot/downloads","issues_url":"https://api.github.com/repos/bakkenbaeck/Teapot/issues{/number}","pulls_url":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls{/number}","milestones_url":"https://api.github.com/repos/bakkenbaeck/Teapot/milestones{/number}","notifications_url":"https://api.github.com/repos/bakkenbaeck/Teapot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bakkenbaeck/Teapot/labels{/name}","releases_url":"https://api.github.com/repos/bakkenbaeck/Teapot/releases{/id}","deployments_url":"https://api.github.com/repos/bakkenbaeck/Teapot/deployments","created_at":"2017-01-26T15:35:09Z","updated_at":"2017-12-29T15:58:42Z","pushed_at":"2018-04-16T08:47:49Z","git_url":"git://github.com/bakkenbaeck/Teapot.git","ssh_url":"git@github.com:bakkenbaeck/Teapot.git","clone_url":"https://github.com/bakkenbaeck/Teapot.git","svn_url":"https://github.com/bakkenbaeck/Teapot","homepage":null,"size":185,"stargazers_count":4,"watchers_count":4,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls/27"},"html":{"href":"https://github.com/bakkenbaeck/Teapot/pull/27"},"issue":{"href":"https://api.github.com/repos/bakkenbaeck/Teapot/issues/27"},"comments":{"href":"https://api.github.com/repos/bakkenbaeck/Teapot/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bakkenbaeck/Teapot/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/bakkenbaeck/Teapot/statuses/3c6c002a0728d616a00156447b70d6c33dae1a7a"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Elland"}}