{"action":"opened","number":52,"pull_request":{"url":"https://api.github.com/repos/vapor/engine/pulls/52","id":84568162,"html_url":"https://github.com/vapor/engine/pull/52","diff_url":"https://github.com/vapor/engine/pull/52.diff","patch_url":"https://github.com/vapor/engine/pull/52.patch","issue_url":"https://api.github.com/repos/vapor/engine/issues/52","number":52,"state":"open","locked":false,"title":"Middleware","user":{"login":"tannernelson","id":1342803,"avatar_url":"https://avatars.githubusercontent.com/u/1342803?v=3","gravatar_id":"","url":"https://api.github.com/users/tannernelson","html_url":"https://github.com/tannernelson","followers_url":"https://api.github.com/users/tannernelson/followers","following_url":"https://api.github.com/users/tannernelson/following{/other_user}","gists_url":"https://api.github.com/users/tannernelson/gists{/gist_id}","starred_url":"https://api.github.com/users/tannernelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tannernelson/subscriptions","organizations_url":"https://api.github.com/users/tannernelson/orgs","repos_url":"https://api.github.com/users/tannernelson/repos","events_url":"https://api.github.com/users/tannernelson/events{/privacy}","received_events_url":"https://api.github.com/users/tannernelson/received_events","type":"User","site_admin":false},"body":"Adds middleware to `Program`. This should not contain any breaking changes, only additive. \r\n\r\n### Instance\r\n\r\n```swift\r\nlet foo = FooMiddleware()\r\nlet client = try BasicClient(scheme: \"http\", host: \"httpbin.org\", port: 80, securityLayer: .none, middleware: [foo])\r\nlet response = try client.request(.get, path: \"headers\")\r\n```\r\n\r\n### Static\r\n\r\n```swift\r\nlet foo = FooMiddleware()\r\nBasicClient.middleware = [foo]\r\n\r\nlet response = try BasicClient.get(\"http://httpbin.org/headers\")\r\n```\r\n\r\n### Servers Too\r\n\r\n```swift\r\nlet server = try BasicServer(host: \"0.0.0.0\", port: 8080, securityLayer: .none, middleware: [foo])\r\n```","created_at":"2016-09-08T22:55:23Z","updated_at":"2016-09-08T22:55:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"tannernelson","id":1342803,"avatar_url":"https://avatars.githubusercontent.com/u/1342803?v=3","gravatar_id":"","url":"https://api.github.com/users/tannernelson","html_url":"https://github.com/tannernelson","followers_url":"https://api.github.com/users/tannernelson/followers","following_url":"https://api.github.com/users/tannernelson/following{/other_user}","gists_url":"https://api.github.com/users/tannernelson/gists{/gist_id}","starred_url":"https://api.github.com/users/tannernelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tannernelson/subscriptions","organizations_url":"https://api.github.com/users/tannernelson/orgs","repos_url":"https://api.github.com/users/tannernelson/repos","events_url":"https://api.github.com/users/tannernelson/events{/privacy}","received_events_url":"https://api.github.com/users/tannernelson/received_events","type":"User","site_admin":false},"assignees":[{"login":"tannernelson","id":1342803,"avatar_url":"https://avatars.githubusercontent.com/u/1342803?v=3","gravatar_id":"","url":"https://api.github.com/users/tannernelson","html_url":"https://github.com/tannernelson","followers_url":"https://api.github.com/users/tannernelson/followers","following_url":"https://api.github.com/users/tannernelson/following{/other_user}","gists_url":"https://api.github.com/users/tannernelson/gists{/gist_id}","starred_url":"https://api.github.com/users/tannernelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tannernelson/subscriptions","organizations_url":"https://api.github.com/users/tannernelson/orgs","repos_url":"https://api.github.com/users/tannernelson/repos","events_url":"https://api.github.com/users/tannernelson/events{/privacy}","received_events_url":"https://api.github.com/users/tannernelson/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/vapor/engine/milestones/9","html_url":"https://github.com/vapor/engine/milestones/0.8.1","labels_url":"https://api.github.com/repos/vapor/engine/milestones/9/labels","id":1992264,"number":9,"title":"0.8.1","description":null,"creator":{"login":"tannernelson","id":1342803,"avatar_url":"https://avatars.githubusercontent.com/u/1342803?v=3","gravatar_id":"","url":"https://api.github.com/users/tannernelson","html_url":"https://github.com/tannernelson","followers_url":"https://api.github.com/users/tannernelson/followers","following_url":"https://api.github.com/users/tannernelson/following{/other_user}","gists_url":"https://api.github.com/users/tannernelson/gists{/gist_id}","starred_url":"https://api.github.com/users/tannernelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tannernelson/subscriptions","organizations_url":"https://api.github.com/users/tannernelson/orgs","repos_url":"https://api.github.com/users/tannernelson/repos","events_url":"https://api.github.com/users/tannernelson/events{/privacy}","received_events_url":"https://api.github.com/users/tannernelson/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2016-09-08T22:54:16Z","updated_at":"2016-09-08T22:55:23Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/vapor/engine/pulls/52/commits","review_comments_url":"https://api.github.com/repos/vapor/engine/pulls/52/comments","review_comment_url":"https://api.github.com/repos/vapor/engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vapor/engine/issues/52/comments","statuses_url":"https://api.github.com/repos/vapor/engine/statuses/f4b0d7abacbae16074e8c80b9ecc4ae5f99341a7","head":{"label":"vapor:middleware","ref":"middleware","sha":"f4b0d7abacbae16074e8c80b9ecc4ae5f99341a7","user":{"login":"vapor","id":17364220,"avatar_url":"https://avatars.githubusercontent.com/u/17364220?v=3","gravatar_id":"","url":"https://api.github.com/users/vapor","html_url":"https://github.com/vapor","followers_url":"https://api.github.com/users/vapor/followers","following_url":"https://api.github.com/users/vapor/following{/other_user}","gists_url":"https://api.github.com/users/vapor/gists{/gist_id}","starred_url":"https://api.github.com/users/vapor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vapor/subscriptions","organizations_url":"https://api.github.com/users/vapor/orgs","repos_url":"https://api.github.com/users/vapor/repos","events_url":"https://api.github.com/users/vapor/events{/privacy}","received_events_url":"https://api.github.com/users/vapor/received_events","type":"Organization","site_admin":false},"repo":{"id":62755830,"name":"engine","full_name":"vapor/engine","owner":{"login":"vapor","id":17364220,"avatar_url":"https://avatars.githubusercontent.com/u/17364220?v=3","gravatar_id":"","url":"https://api.github.com/users/vapor","html_url":"https://github.com/vapor","followers_url":"https://api.github.com/users/vapor/followers","following_url":"https://api.github.com/users/vapor/following{/other_user}","gists_url":"https://api.github.com/users/vapor/gists{/gist_id}","starred_url":"https://api.github.com/users/vapor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vapor/subscriptions","organizations_url":"https://api.github.com/users/vapor/orgs","repos_url":"https://api.github.com/users/vapor/repos","events_url":"https://api.github.com/users/vapor/events{/privacy}","received_events_url":"https://api.github.com/users/vapor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vapor/engine","description":"HTTP, WebSockets, Streams, SMTP, etc. Core transport layer used in https://github.com/vapor/vapor","fork":false,"url":"https://api.github.com/repos/vapor/engine","forks_url":"https://api.github.com/repos/vapor/engine/forks","keys_url":"https://api.github.com/repos/vapor/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vapor/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vapor/engine/teams","hooks_url":"https://api.github.com/repos/vapor/engine/hooks","issue_events_url":"https://api.github.com/repos/vapor/engine/issues/events{/number}","events_url":"https://api.github.com/repos/vapor/engine/events","assignees_url":"https://api.github.com/repos/vapor/engine/assignees{/user}","branches_url":"https://api.github.com/repos/vapor/engine/branches{/branch}","tags_url":"https://api.github.com/repos/vapor/engine/tags","blobs_url":"https://api.github.com/repos/vapor/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vapor/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vapor/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/vapor/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vapor/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/vapor/engine/languages","stargazers_url":"https://api.github.com/repos/vapor/engine/stargazers","contributors_url":"https://api.github.com/repos/vapor/engine/contributors","subscribers_url":"https://api.github.com/repos/vapor/engine/subscribers","subscription_url":"https://api.github.com/repos/vapor/engine/subscription","commits_url":"https://api.github.com/repos/vapor/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/vapor/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/vapor/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/vapor/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/vapor/engine/contents/{+path}","compare_url":"https://api.github.com/repos/vapor/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vapor/engine/merges","archive_url":"https://api.github.com/repos/vapor/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vapor/engine/downloads","issues_url":"https://api.github.com/repos/vapor/engine/issues{/number}","pulls_url":"https://api.github.com/repos/vapor/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/vapor/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/vapor/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vapor/engine/labels{/name}","releases_url":"https://api.github.com/repos/vapor/engine/releases{/id}","deployments_url":"https://api.github.com/repos/vapor/engine/deployments","created_at":"2016-07-06T21:55:03Z","updated_at":"2016-09-08T08:57:31Z","pushed_at":"2016-09-08T22:53:53Z","git_url":"git://github.com/vapor/engine.git","ssh_url":"git@github.com:vapor/engine.git","clone_url":"https://github.com/vapor/engine.git","svn_url":"https://github.com/vapor/engine","homepage":"","size":8837,"stargazers_count":41,"watchers_count":41,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":6,"forks":7,"open_issues":6,"watchers":41,"default_branch":"master"}},"base":{"label":"vapor:master","ref":"master","sha":"24eb7fd0f58cb718617206c7f6da80218959c6dc","user":{"login":"vapor","id":17364220,"avatar_url":"https://avatars.githubusercontent.com/u/17364220?v=3","gravatar_id":"","url":"https://api.github.com/users/vapor","html_url":"https://github.com/vapor","followers_url":"https://api.github.com/users/vapor/followers","following_url":"https://api.github.com/users/vapor/following{/other_user}","gists_url":"https://api.github.com/users/vapor/gists{/gist_id}","starred_url":"https://api.github.com/users/vapor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vapor/subscriptions","organizations_url":"https://api.github.com/users/vapor/orgs","repos_url":"https://api.github.com/users/vapor/repos","events_url":"https://api.github.com/users/vapor/events{/privacy}","received_events_url":"https://api.github.com/users/vapor/received_events","type":"Organization","site_admin":false},"repo":{"id":62755830,"name":"engine","full_name":"vapor/engine","owner":{"login":"vapor","id":17364220,"avatar_url":"https://avatars.githubusercontent.com/u/17364220?v=3","gravatar_id":"","url":"https://api.github.com/users/vapor","html_url":"https://github.com/vapor","followers_url":"https://api.github.com/users/vapor/followers","following_url":"https://api.github.com/users/vapor/following{/other_user}","gists_url":"https://api.github.com/users/vapor/gists{/gist_id}","starred_url":"https://api.github.com/users/vapor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vapor/subscriptions","organizations_url":"https://api.github.com/users/vapor/orgs","repos_url":"https://api.github.com/users/vapor/repos","events_url":"https://api.github.com/users/vapor/events{/privacy}","received_events_url":"https://api.github.com/users/vapor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vapor/engine","description":"HTTP, WebSockets, Streams, SMTP, etc. Core transport layer used in https://github.com/vapor/vapor","fork":false,"url":"https://api.github.com/repos/vapor/engine","forks_url":"https://api.github.com/repos/vapor/engine/forks","keys_url":"https://api.github.com/repos/vapor/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vapor/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vapor/engine/teams","hooks_url":"https://api.github.com/repos/vapor/engine/hooks","issue_events_url":"https://api.github.com/repos/vapor/engine/issues/events{/number}","events_url":"https://api.github.com/repos/vapor/engine/events","assignees_url":"https://api.github.com/repos/vapor/engine/assignees{/user}","branches_url":"https://api.github.com/repos/vapor/engine/branches{/branch}","tags_url":"https://api.github.com/repos/vapor/engine/tags","blobs_url":"https://api.github.com/repos/vapor/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vapor/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vapor/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/vapor/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vapor/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/vapor/engine/languages","stargazers_url":"https://api.github.com/repos/vapor/engine/stargazers","contributors_url":"https://api.github.com/repos/vapor/engine/contributors","subscribers_url":"https://api.github.com/repos/vapor/engine/subscribers","subscription_url":"https://api.github.com/repos/vapor/engine/subscription","commits_url":"https://api.github.com/repos/vapor/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/vapor/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/vapor/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/vapor/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/vapor/engine/contents/{+path}","compare_url":"https://api.github.com/repos/vapor/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vapor/engine/merges","archive_url":"https://api.github.com/repos/vapor/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vapor/engine/downloads","issues_url":"https://api.github.com/repos/vapor/engine/issues{/number}","pulls_url":"https://api.github.com/repos/vapor/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/vapor/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/vapor/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vapor/engine/labels{/name}","releases_url":"https://api.github.com/repos/vapor/engine/releases{/id}","deployments_url":"https://api.github.com/repos/vapor/engine/deployments","created_at":"2016-07-06T21:55:03Z","updated_at":"2016-09-08T08:57:31Z","pushed_at":"2016-09-08T22:53:53Z","git_url":"git://github.com/vapor/engine.git","ssh_url":"git@github.com:vapor/engine.git","clone_url":"https://github.com/vapor/engine.git","svn_url":"https://github.com/vapor/engine","homepage":"","size":8837,"stargazers_count":41,"watchers_count":41,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":6,"forks":7,"open_issues":6,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vapor/engine/pulls/52"},"html":{"href":"https://github.com/vapor/engine/pull/52"},"issue":{"href":"https://api.github.com/repos/vapor/engine/issues/52"},"comments":{"href":"https://api.github.com/repos/vapor/engine/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/vapor/engine/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/vapor/engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vapor/engine/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/vapor/engine/statuses/f4b0d7abacbae16074e8c80b9ecc4ae5f99341a7"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":259,"deletions":45,"changed_files":9}}
{"actor":{"display_login":"tannernelson"}}