{"action":"closed","number":1383,"pull_request":{"url":"https://api.github.com/repos/ponylang/ponyc/pulls/1383","id":91538338,"html_url":"https://github.com/ponylang/ponyc/pull/1383","diff_url":"https://github.com/ponylang/ponyc/pull/1383.diff","patch_url":"https://github.com/ponylang/ponyc/pull/1383.patch","issue_url":"https://api.github.com/repos/ponylang/ponyc/issues/1383","number":1383,"state":"closed","locked":false,"title":"examples/httpserver: use case for POST body","user":{"login":"avsej","id":7280,"avatar_url":"https://avatars.githubusercontent.com/u/7280?v=3","gravatar_id":"","url":"https://api.github.com/users/avsej","html_url":"https://github.com/avsej","followers_url":"https://api.github.com/users/avsej/followers","following_url":"https://api.github.com/users/avsej/following{/other_user}","gists_url":"https://api.github.com/users/avsej/gists{/gist_id}","starred_url":"https://api.github.com/users/avsej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avsej/subscriptions","organizations_url":"https://api.github.com/users/avsej/orgs","repos_url":"https://api.github.com/users/avsej/repos","events_url":"https://api.github.com/users/avsej/events{/privacy}","received_events_url":"https://api.github.com/users/avsej/received_events","type":"User","site_admin":false},"body":"@SeanTAllen I'm trying to write simple web service, and stopped at reading the body in the HTTP request handler. In the handler I need to both get access to `.body()` and `.respond()`. How I would do that?\n\n```\nBuilding builtin -> .local/lib/pony/0.8.0-d9f75a8/packages/builtin\nBuilding examples/httpserver -> examples/httpserver\nBuilding net/http -> .local/lib/pony/0.8.0-d9f75a8/packages/net/http\nBuilding collections -> .local/lib/pony/0.8.0-d9f75a8/packages/collections\nBuilding ponytest -> .local/lib/pony/0.8.0-d9f75a8/packages/ponytest\nBuilding time -> .local/lib/pony/0.8.0-d9f75a8/packages/time\nBuilding net -> .local/lib/pony/0.8.0-d9f75a8/packages/net\nBuilding net/ssl -> .local/lib/pony/0.8.0-d9f75a8/packages/net/ssl\nBuilding files -> .local/lib/pony/0.8.0-d9f75a8/packages/files\nBuilding capsicum -> .local/lib/pony/0.8.0-d9f75a8/packages/capsicum\nBuilding buffered -> .local/lib/pony/0.8.0-d9f75a8/packages/buffered\nBuilding crypto -> .local/lib/pony/0.8.0-d9f75a8/packages/crypto\nBuilding format -> .local/lib/pony/0.8.0-d9f75a8/packages/format\nError:\nexamples/httpserver/httpserver.pony:63:41: receiver type is not a subtype of target type\n      for chunk in request.body().values() do\n                                        ^\n    Info:\n    examples/httpserver/httpserver.pony:63:32: receiver type: Array[(String val | Array[U8 val] val)] tag\n          for chunk in request.body().values() do\n                                   ^\n    .local/lib/pony/0.8.0-d9f75a8/packages/builtin/array.pony:540:3: target type: Array[(String val | Array[U8 val] val)] box\n      fun values(): ArrayValues[A, this->Array[A]]^ =>\n      ^\n    .local/lib/pony/0.8.0-d9f75a8/packages/net/http/payload.pony:76:21: Array[(String val | Array[U8 val] val)] tag is not a subtype of Array[(String val | Array[U8 val] val)] box: tag is not a subtype of box\n      fun body(): this->Array[ByteSeq] =>\n                        ^\n```\n","created_at":"2016-10-30T22:00:52Z","updated_at":"2016-10-31T12:20:19Z","closed_at":"2016-10-31T12:20:19Z","merged_at":null,"merge_commit_sha":"1c702a39528189657f31a1975175cc2601618497","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ponylang/ponyc/pulls/1383/commits","review_comments_url":"https://api.github.com/repos/ponylang/ponyc/pulls/1383/comments","review_comment_url":"https://api.github.com/repos/ponylang/ponyc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ponylang/ponyc/issues/1383/comments","statuses_url":"https://api.github.com/repos/ponylang/ponyc/statuses/f33f58149ff9740459916eaf9e8bff24daae9558","head":{"label":"avsej:usecase-for-http-post-body","ref":"usecase-for-http-post-body","sha":"f33f58149ff9740459916eaf9e8bff24daae9558","user":{"login":"avsej","id":7280,"avatar_url":"https://avatars.githubusercontent.com/u/7280?v=3","gravatar_id":"","url":"https://api.github.com/users/avsej","html_url":"https://github.com/avsej","followers_url":"https://api.github.com/users/avsej/followers","following_url":"https://api.github.com/users/avsej/following{/other_user}","gists_url":"https://api.github.com/users/avsej/gists{/gist_id}","starred_url":"https://api.github.com/users/avsej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avsej/subscriptions","organizations_url":"https://api.github.com/users/avsej/orgs","repos_url":"https://api.github.com/users/avsej/repos","events_url":"https://api.github.com/users/avsej/events{/privacy}","received_events_url":"https://api.github.com/users/avsej/received_events","type":"User","site_admin":false},"repo":{"id":71390445,"name":"ponyc","full_name":"avsej/ponyc","owner":{"login":"avsej","id":7280,"avatar_url":"https://avatars.githubusercontent.com/u/7280?v=3","gravatar_id":"","url":"https://api.github.com/users/avsej","html_url":"https://github.com/avsej","followers_url":"https://api.github.com/users/avsej/followers","following_url":"https://api.github.com/users/avsej/following{/other_user}","gists_url":"https://api.github.com/users/avsej/gists{/gist_id}","starred_url":"https://api.github.com/users/avsej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avsej/subscriptions","organizations_url":"https://api.github.com/users/avsej/orgs","repos_url":"https://api.github.com/users/avsej/repos","events_url":"https://api.github.com/users/avsej/events{/privacy}","received_events_url":"https://api.github.com/users/avsej/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/avsej/ponyc","description":"Pony is an open-source, object-oriented, actor-model, capabilities-secure, high performance programming language","fork":true,"url":"https://api.github.com/repos/avsej/ponyc","forks_url":"https://api.github.com/repos/avsej/ponyc/forks","keys_url":"https://api.github.com/repos/avsej/ponyc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avsej/ponyc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avsej/ponyc/teams","hooks_url":"https://api.github.com/repos/avsej/ponyc/hooks","issue_events_url":"https://api.github.com/repos/avsej/ponyc/issues/events{/number}","events_url":"https://api.github.com/repos/avsej/ponyc/events","assignees_url":"https://api.github.com/repos/avsej/ponyc/assignees{/user}","branches_url":"https://api.github.com/repos/avsej/ponyc/branches{/branch}","tags_url":"https://api.github.com/repos/avsej/ponyc/tags","blobs_url":"https://api.github.com/repos/avsej/ponyc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avsej/ponyc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avsej/ponyc/git/refs{/sha}","trees_url":"https://api.github.com/repos/avsej/ponyc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avsej/ponyc/statuses/{sha}","languages_url":"https://api.github.com/repos/avsej/ponyc/languages","stargazers_url":"https://api.github.com/repos/avsej/ponyc/stargazers","contributors_url":"https://api.github.com/repos/avsej/ponyc/contributors","subscribers_url":"https://api.github.com/repos/avsej/ponyc/subscribers","subscription_url":"https://api.github.com/repos/avsej/ponyc/subscription","commits_url":"https://api.github.com/repos/avsej/ponyc/commits{/sha}","git_commits_url":"https://api.github.com/repos/avsej/ponyc/git/commits{/sha}","comments_url":"https://api.github.com/repos/avsej/ponyc/comments{/number}","issue_comment_url":"https://api.github.com/repos/avsej/ponyc/issues/comments{/number}","contents_url":"https://api.github.com/repos/avsej/ponyc/contents/{+path}","compare_url":"https://api.github.com/repos/avsej/ponyc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avsej/ponyc/merges","archive_url":"https://api.github.com/repos/avsej/ponyc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avsej/ponyc/downloads","issues_url":"https://api.github.com/repos/avsej/ponyc/issues{/number}","pulls_url":"https://api.github.com/repos/avsej/ponyc/pulls{/number}","milestones_url":"https://api.github.com/repos/avsej/ponyc/milestones{/number}","notifications_url":"https://api.github.com/repos/avsej/ponyc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avsej/ponyc/labels{/name}","releases_url":"https://api.github.com/repos/avsej/ponyc/releases{/id}","deployments_url":"https://api.github.com/repos/avsej/ponyc/deployments","created_at":"2016-10-19T19:08:10Z","updated_at":"2016-10-19T19:08:13Z","pushed_at":"2016-10-30T21:59:54Z","git_url":"git://github.com/avsej/ponyc.git","ssh_url":"git@github.com:avsej/ponyc.git","clone_url":"https://github.com/avsej/ponyc.git","svn_url":"https://github.com/avsej/ponyc","homepage":"http://www.ponylang.org","size":9316,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"ponylang:master","ref":"master","sha":"d9f75a896d5f9c63f7c95107234bfd27aee05528","user":{"login":"ponylang","id":12997238,"avatar_url":"https://avatars.githubusercontent.com/u/12997238?v=3","gravatar_id":"","url":"https://api.github.com/users/ponylang","html_url":"https://github.com/ponylang","followers_url":"https://api.github.com/users/ponylang/followers","following_url":"https://api.github.com/users/ponylang/following{/other_user}","gists_url":"https://api.github.com/users/ponylang/gists{/gist_id}","starred_url":"https://api.github.com/users/ponylang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ponylang/subscriptions","organizations_url":"https://api.github.com/users/ponylang/orgs","repos_url":"https://api.github.com/users/ponylang/repos","events_url":"https://api.github.com/users/ponylang/events{/privacy}","received_events_url":"https://api.github.com/users/ponylang/received_events","type":"Organization","site_admin":false},"repo":{"id":6667084,"name":"ponyc","full_name":"ponylang/ponyc","owner":{"login":"ponylang","id":12997238,"avatar_url":"https://avatars.githubusercontent.com/u/12997238?v=3","gravatar_id":"","url":"https://api.github.com/users/ponylang","html_url":"https://github.com/ponylang","followers_url":"https://api.github.com/users/ponylang/followers","following_url":"https://api.github.com/users/ponylang/following{/other_user}","gists_url":"https://api.github.com/users/ponylang/gists{/gist_id}","starred_url":"https://api.github.com/users/ponylang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ponylang/subscriptions","organizations_url":"https://api.github.com/users/ponylang/orgs","repos_url":"https://api.github.com/users/ponylang/repos","events_url":"https://api.github.com/users/ponylang/events{/privacy}","received_events_url":"https://api.github.com/users/ponylang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ponylang/ponyc","description":"Pony is an open-source, object-oriented, actor-model, capabilities-secure, high performance programming language","fork":false,"url":"https://api.github.com/repos/ponylang/ponyc","forks_url":"https://api.github.com/repos/ponylang/ponyc/forks","keys_url":"https://api.github.com/repos/ponylang/ponyc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ponylang/ponyc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ponylang/ponyc/teams","hooks_url":"https://api.github.com/repos/ponylang/ponyc/hooks","issue_events_url":"https://api.github.com/repos/ponylang/ponyc/issues/events{/number}","events_url":"https://api.github.com/repos/ponylang/ponyc/events","assignees_url":"https://api.github.com/repos/ponylang/ponyc/assignees{/user}","branches_url":"https://api.github.com/repos/ponylang/ponyc/branches{/branch}","tags_url":"https://api.github.com/repos/ponylang/ponyc/tags","blobs_url":"https://api.github.com/repos/ponylang/ponyc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ponylang/ponyc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ponylang/ponyc/git/refs{/sha}","trees_url":"https://api.github.com/repos/ponylang/ponyc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ponylang/ponyc/statuses/{sha}","languages_url":"https://api.github.com/repos/ponylang/ponyc/languages","stargazers_url":"https://api.github.com/repos/ponylang/ponyc/stargazers","contributors_url":"https://api.github.com/repos/ponylang/ponyc/contributors","subscribers_url":"https://api.github.com/repos/ponylang/ponyc/subscribers","subscription_url":"https://api.github.com/repos/ponylang/ponyc/subscription","commits_url":"https://api.github.com/repos/ponylang/ponyc/commits{/sha}","git_commits_url":"https://api.github.com/repos/ponylang/ponyc/git/commits{/sha}","comments_url":"https://api.github.com/repos/ponylang/ponyc/comments{/number}","issue_comment_url":"https://api.github.com/repos/ponylang/ponyc/issues/comments{/number}","contents_url":"https://api.github.com/repos/ponylang/ponyc/contents/{+path}","compare_url":"https://api.github.com/repos/ponylang/ponyc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ponylang/ponyc/merges","archive_url":"https://api.github.com/repos/ponylang/ponyc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ponylang/ponyc/downloads","issues_url":"https://api.github.com/repos/ponylang/ponyc/issues{/number}","pulls_url":"https://api.github.com/repos/ponylang/ponyc/pulls{/number}","milestones_url":"https://api.github.com/repos/ponylang/ponyc/milestones{/number}","notifications_url":"https://api.github.com/repos/ponylang/ponyc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ponylang/ponyc/labels{/name}","releases_url":"https://api.github.com/repos/ponylang/ponyc/releases{/id}","deployments_url":"https://api.github.com/repos/ponylang/ponyc/deployments","created_at":"2012-11-13T07:38:25Z","updated_at":"2016-10-29T13:02:48Z","pushed_at":"2016-10-31T11:19:51Z","git_url":"git://github.com/ponylang/ponyc.git","ssh_url":"git@github.com:ponylang/ponyc.git","clone_url":"https://github.com/ponylang/ponyc.git","svn_url":"https://github.com/ponylang/ponyc","homepage":"http://www.ponylang.org","size":119128,"stargazers_count":1897,"watchers_count":1897,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":143,"mirror_url":null,"open_issues_count":82,"forks":143,"open_issues":82,"watchers":1897,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ponylang/ponyc/pulls/1383"},"html":{"href":"https://github.com/ponylang/ponyc/pull/1383"},"issue":{"href":"https://api.github.com/repos/ponylang/ponyc/issues/1383"},"comments":{"href":"https://api.github.com/repos/ponylang/ponyc/issues/1383/comments"},"review_comments":{"href":"https://api.github.com/repos/ponylang/ponyc/pulls/1383/comments"},"review_comment":{"href":"https://api.github.com/repos/ponylang/ponyc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ponylang/ponyc/pulls/1383/commits"},"statuses":{"href":"https://api.github.com/repos/ponylang/ponyc/statuses/f33f58149ff9740459916eaf9e8bff24daae9558"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":10,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"avsej"}}