{"action":"created","comment":{"url":"https://api.github.com/repos/stoplightio/prism/pulls/comments/226679749","pull_request_review_id":166566244,"id":226679749,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjY3OTc0OQ==","diff_hunk":"@@ -0,0 +1,50 @@\n+import { IForwarder, IPrismInput } from '@stoplight/prism-core';\n+import { IHttpOperation, IServer } from '@stoplight/types';\n+import axios from 'axios';\n+import { IHttpConfig, IHttpRequest, IHttpResponse } from '../types';\n+\n+export class HttpForwarder\n+  implements IForwarder<IHttpOperation, IHttpRequest, IHttpConfig, IHttpResponse> {\n+  public async forward(opts: {\n+    resource?: IHttpOperation;\n+    // todo: IHttpRequest should be enough\n+    input: IPrismInput<IHttpRequest>;\n+  }): Promise<IHttpResponse> {\n+    if (!opts.resource) {\n+      throw new Error('Missing spec');\n+    }\n+    if (!opts.resource.servers || opts.resource.servers.length === 0) {\n+      throw new Error('Server list is missing in spec');\n+    }\n+\n+    const response = await axios({\n+      method: opts.input.data.method,\n+      url: this.resolveServerUrl(opts.resource.servers[0]) + opts.input.data.url.path,","path":"packages/http/src/forwarder/HttpForwarder.ts","position":null,"original_position":22,"commit_id":"3eb957b57f1e91b21a34c78939e1f37fbd6a1abb","original_commit_id":"feb4c024629d6e179be7dc3bea54f31a9843b753","user":{"login":"StefanDywersant","id":7136002,"node_id":"MDQ6VXNlcjcxMzYwMDI=","avatar_url":"https://avatars0.githubusercontent.com/u/7136002?v=4","gravatar_id":"","url":"https://api.github.com/users/StefanDywersant","html_url":"https://github.com/StefanDywersant","followers_url":"https://api.github.com/users/StefanDywersant/followers","following_url":"https://api.github.com/users/StefanDywersant/following{/other_user}","gists_url":"https://api.github.com/users/StefanDywersant/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanDywersant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanDywersant/subscriptions","organizations_url":"https://api.github.com/users/StefanDywersant/orgs","repos_url":"https://api.github.com/users/StefanDywersant/repos","events_url":"https://api.github.com/users/StefanDywersant/events{/privacy}","received_events_url":"https://api.github.com/users/StefanDywersant/received_events","type":"User","site_admin":false},"body":"Template strings are nice feature, but which one is prettier in that case: `${a}${b}` or `a + b` ?\r\nI vote on the latter ;-)","created_at":"2018-10-19T15:03:43Z","updated_at":"2018-10-19T15:03:43Z","html_url":"https://github.com/stoplightio/prism/pull/159#discussion_r226679749","pull_request_url":"https://api.github.com/repos/stoplightio/prism/pulls/159","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/stoplightio/prism/pulls/comments/226679749"},"html":{"href":"https://github.com/stoplightio/prism/pull/159#discussion_r226679749"},"pull_request":{"href":"https://api.github.com/repos/stoplightio/prism/pulls/159"}},"in_reply_to_id":226662503},"pull_request":{"url":"https://api.github.com/repos/stoplightio/prism/pulls/159","id":224296652,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0Mjk2NjUy","html_url":"https://github.com/stoplightio/prism/pull/159","diff_url":"https://github.com/stoplightio/prism/pull/159.diff","patch_url":"https://github.com/stoplightio/prism/pull/159.patch","issue_url":"https://api.github.com/repos/stoplightio/prism/issues/159","number":159,"state":"open","locked":false,"title":"SL-71 HttpForwarder","user":{"login":"StefanDywersant","id":7136002,"node_id":"MDQ6VXNlcjcxMzYwMDI=","avatar_url":"https://avatars0.githubusercontent.com/u/7136002?v=4","gravatar_id":"","url":"https://api.github.com/users/StefanDywersant","html_url":"https://github.com/StefanDywersant","followers_url":"https://api.github.com/users/StefanDywersant/followers","following_url":"https://api.github.com/users/StefanDywersant/following{/other_user}","gists_url":"https://api.github.com/users/StefanDywersant/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanDywersant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanDywersant/subscriptions","organizations_url":"https://api.github.com/users/StefanDywersant/orgs","repos_url":"https://api.github.com/users/StefanDywersant/repos","events_url":"https://api.github.com/users/StefanDywersant/events{/privacy}","received_events_url":"https://api.github.com/users/StefanDywersant/received_events","type":"User","site_admin":false},"body":"Jira task: https://stoplightio.atlassian.net/browse/SL-71","created_at":"2018-10-19T13:58:35Z","updated_at":"2018-10-19T15:03:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0687abde6c349bd0a4079433d0b7ef061900518c","assignee":{"login":"StefanDywersant","id":7136002,"node_id":"MDQ6VXNlcjcxMzYwMDI=","avatar_url":"https://avatars0.githubusercontent.com/u/7136002?v=4","gravatar_id":"","url":"https://api.github.com/users/StefanDywersant","html_url":"https://github.com/StefanDywersant","followers_url":"https://api.github.com/users/StefanDywersant/followers","following_url":"https://api.github.com/users/StefanDywersant/following{/other_user}","gists_url":"https://api.github.com/users/StefanDywersant/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanDywersant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanDywersant/subscriptions","organizations_url":"https://api.github.com/users/StefanDywersant/orgs","repos_url":"https://api.github.com/users/StefanDywersant/repos","events_url":"https://api.github.com/users/StefanDywersant/events{/privacy}","received_events_url":"https://api.github.com/users/StefanDywersant/received_events","type":"User","site_admin":false},"assignees":[{"login":"StefanDywersant","id":7136002,"node_id":"MDQ6VXNlcjcxMzYwMDI=","avatar_url":"https://avatars0.githubusercontent.com/u/7136002?v=4","gravatar_id":"","url":"https://api.github.com/users/StefanDywersant","html_url":"https://github.com/StefanDywersant","followers_url":"https://api.github.com/users/StefanDywersant/followers","following_url":"https://api.github.com/users/StefanDywersant/following{/other_user}","gists_url":"https://api.github.com/users/StefanDywersant/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanDywersant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanDywersant/subscriptions","organizations_url":"https://api.github.com/users/StefanDywersant/orgs","repos_url":"https://api.github.com/users/StefanDywersant/repos","events_url":"https://api.github.com/users/StefanDywersant/events{/privacy}","received_events_url":"https://api.github.com/users/StefanDywersant/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"pytlesk4","id":2294309,"node_id":"MDQ6VXNlcjIyOTQzMDk=","avatar_url":"https://avatars2.githubusercontent.com/u/2294309?v=4","gravatar_id":"","url":"https://api.github.com/users/pytlesk4","html_url":"https://github.com/pytlesk4","followers_url":"https://api.github.com/users/pytlesk4/followers","following_url":"https://api.github.com/users/pytlesk4/following{/other_user}","gists_url":"https://api.github.com/users/pytlesk4/gists{/gist_id}","starred_url":"https://api.github.com/users/pytlesk4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytlesk4/subscriptions","organizations_url":"https://api.github.com/users/pytlesk4/orgs","repos_url":"https://api.github.com/users/pytlesk4/repos","events_url":"https://api.github.com/users/pytlesk4/events{/privacy}","received_events_url":"https://api.github.com/users/pytlesk4/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/stoplightio/prism/pulls/159/commits","review_comments_url":"https://api.github.com/repos/stoplightio/prism/pulls/159/comments","review_comment_url":"https://api.github.com/repos/stoplightio/prism/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stoplightio/prism/issues/159/comments","statuses_url":"https://api.github.com/repos/stoplightio/prism/statuses/3eb957b57f1e91b21a34c78939e1f37fbd6a1abb","head":{"label":"stoplightio:feature/sl-71/implement-forwarder","ref":"feature/sl-71/implement-forwarder","sha":"3eb957b57f1e91b21a34c78939e1f37fbd6a1abb","user":{"login":"stoplightio","id":10767217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNzY3MjE3","avatar_url":"https://avatars1.githubusercontent.com/u/10767217?v=4","gravatar_id":"","url":"https://api.github.com/users/stoplightio","html_url":"https://github.com/stoplightio","followers_url":"https://api.github.com/users/stoplightio/followers","following_url":"https://api.github.com/users/stoplightio/following{/other_user}","gists_url":"https://api.github.com/users/stoplightio/gists{/gist_id}","starred_url":"https://api.github.com/users/stoplightio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoplightio/subscriptions","organizations_url":"https://api.github.com/users/stoplightio/orgs","repos_url":"https://api.github.com/users/stoplightio/repos","events_url":"https://api.github.com/users/stoplightio/events{/privacy}","received_events_url":"https://api.github.com/users/stoplightio/received_events","type":"Organization","site_admin":false},"repo":{"id":54172257,"node_id":"MDEwOlJlcG9zaXRvcnk1NDE3MjI1Nw==","name":"prism","full_name":"stoplightio/prism","private":false,"owner":{"login":"stoplightio","id":10767217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNzY3MjE3","avatar_url":"https://avatars1.githubusercontent.com/u/10767217?v=4","gravatar_id":"","url":"https://api.github.com/users/stoplightio","html_url":"https://github.com/stoplightio","followers_url":"https://api.github.com/users/stoplightio/followers","following_url":"https://api.github.com/users/stoplightio/following{/other_user}","gists_url":"https://api.github.com/users/stoplightio/gists{/gist_id}","starred_url":"https://api.github.com/users/stoplightio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoplightio/subscriptions","organizations_url":"https://api.github.com/users/stoplightio/orgs","repos_url":"https://api.github.com/users/stoplightio/repos","events_url":"https://api.github.com/users/stoplightio/events{/privacy}","received_events_url":"https://api.github.com/users/stoplightio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/stoplightio/prism","description":"Turn any OAS (Swagger 2) file into an API server with mocking, transformations, validations, and more.","fork":false,"url":"https://api.github.com/repos/stoplightio/prism","forks_url":"https://api.github.com/repos/stoplightio/prism/forks","keys_url":"https://api.github.com/repos/stoplightio/prism/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stoplightio/prism/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stoplightio/prism/teams","hooks_url":"https://api.github.com/repos/stoplightio/prism/hooks","issue_events_url":"https://api.github.com/repos/stoplightio/prism/issues/events{/number}","events_url":"https://api.github.com/repos/stoplightio/prism/events","assignees_url":"https://api.github.com/repos/stoplightio/prism/assignees{/user}","branches_url":"https://api.github.com/repos/stoplightio/prism/branches{/branch}","tags_url":"https://api.github.com/repos/stoplightio/prism/tags","blobs_url":"https://api.github.com/repos/stoplightio/prism/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stoplightio/prism/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stoplightio/prism/git/refs{/sha}","trees_url":"https://api.github.com/repos/stoplightio/prism/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stoplightio/prism/statuses/{sha}","languages_url":"https://api.github.com/repos/stoplightio/prism/languages","stargazers_url":"https://api.github.com/repos/stoplightio/prism/stargazers","contributors_url":"https://api.github.com/repos/stoplightio/prism/contributors","subscribers_url":"https://api.github.com/repos/stoplightio/prism/subscribers","subscription_url":"https://api.github.com/repos/stoplightio/prism/subscription","commits_url":"https://api.github.com/repos/stoplightio/prism/commits{/sha}","git_commits_url":"https://api.github.com/repos/stoplightio/prism/git/commits{/sha}","comments_url":"https://api.github.com/repos/stoplightio/prism/comments{/number}","issue_comment_url":"https://api.github.com/repos/stoplightio/prism/issues/comments{/number}","contents_url":"https://api.github.com/repos/stoplightio/prism/contents/{+path}","compare_url":"https://api.github.com/repos/stoplightio/prism/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stoplightio/prism/merges","archive_url":"https://api.github.com/repos/stoplightio/prism/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stoplightio/prism/downloads","issues_url":"https://api.github.com/repos/stoplightio/prism/issues{/number}","pulls_url":"https://api.github.com/repos/stoplightio/prism/pulls{/number}","milestones_url":"https://api.github.com/repos/stoplightio/prism/milestones{/number}","notifications_url":"https://api.github.com/repos/stoplightio/prism/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stoplightio/prism/labels{/name}","releases_url":"https://api.github.com/repos/stoplightio/prism/releases{/id}","deployments_url":"https://api.github.com/repos/stoplightio/prism/deployments","created_at":"2016-03-18T03:52:09Z","updated_at":"2018-10-19T11:22:32Z","pushed_at":"2018-10-19T14:58:54Z","git_url":"git://github.com/stoplightio/prism.git","ssh_url":"git@github.com:stoplightio/prism.git","clone_url":"https://github.com/stoplightio/prism.git","svn_url":"https://github.com/stoplightio/prism","homepage":"https://stoplight.io/platform/prism","size":360,"stargazers_count":136,"watchers_count":136,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":62,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":11,"open_issues":62,"watchers":136,"default_branch":"2.x"}},"base":{"label":"stoplightio:develop","ref":"develop","sha":"ad925e22546d9f297f4998e971433193ce6a42a7","user":{"login":"stoplightio","id":10767217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNzY3MjE3","avatar_url":"https://avatars1.githubusercontent.com/u/10767217?v=4","gravatar_id":"","url":"https://api.github.com/users/stoplightio","html_url":"https://github.com/stoplightio","followers_url":"https://api.github.com/users/stoplightio/followers","following_url":"https://api.github.com/users/stoplightio/following{/other_user}","gists_url":"https://api.github.com/users/stoplightio/gists{/gist_id}","starred_url":"https://api.github.com/users/stoplightio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoplightio/subscriptions","organizations_url":"https://api.github.com/users/stoplightio/orgs","repos_url":"https://api.github.com/users/stoplightio/repos","events_url":"https://api.github.com/users/stoplightio/events{/privacy}","received_events_url":"https://api.github.com/users/stoplightio/received_events","type":"Organization","site_admin":false},"repo":{"id":54172257,"node_id":"MDEwOlJlcG9zaXRvcnk1NDE3MjI1Nw==","name":"prism","full_name":"stoplightio/prism","private":false,"owner":{"login":"stoplightio","id":10767217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNzY3MjE3","avatar_url":"https://avatars1.githubusercontent.com/u/10767217?v=4","gravatar_id":"","url":"https://api.github.com/users/stoplightio","html_url":"https://github.com/stoplightio","followers_url":"https://api.github.com/users/stoplightio/followers","following_url":"https://api.github.com/users/stoplightio/following{/other_user}","gists_url":"https://api.github.com/users/stoplightio/gists{/gist_id}","starred_url":"https://api.github.com/users/stoplightio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoplightio/subscriptions","organizations_url":"https://api.github.com/users/stoplightio/orgs","repos_url":"https://api.github.com/users/stoplightio/repos","events_url":"https://api.github.com/users/stoplightio/events{/privacy}","received_events_url":"https://api.github.com/users/stoplightio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/stoplightio/prism","description":"Turn any OAS (Swagger 2) file into an API server with mocking, transformations, validations, and more.","fork":false,"url":"https://api.github.com/repos/stoplightio/prism","forks_url":"https://api.github.com/repos/stoplightio/prism/forks","keys_url":"https://api.github.com/repos/stoplightio/prism/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stoplightio/prism/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stoplightio/prism/teams","hooks_url":"https://api.github.com/repos/stoplightio/prism/hooks","issue_events_url":"https://api.github.com/repos/stoplightio/prism/issues/events{/number}","events_url":"https://api.github.com/repos/stoplightio/prism/events","assignees_url":"https://api.github.com/repos/stoplightio/prism/assignees{/user}","branches_url":"https://api.github.com/repos/stoplightio/prism/branches{/branch}","tags_url":"https://api.github.com/repos/stoplightio/prism/tags","blobs_url":"https://api.github.com/repos/stoplightio/prism/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stoplightio/prism/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stoplightio/prism/git/refs{/sha}","trees_url":"https://api.github.com/repos/stoplightio/prism/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stoplightio/prism/statuses/{sha}","languages_url":"https://api.github.com/repos/stoplightio/prism/languages","stargazers_url":"https://api.github.com/repos/stoplightio/prism/stargazers","contributors_url":"https://api.github.com/repos/stoplightio/prism/contributors","subscribers_url":"https://api.github.com/repos/stoplightio/prism/subscribers","subscription_url":"https://api.github.com/repos/stoplightio/prism/subscription","commits_url":"https://api.github.com/repos/stoplightio/prism/commits{/sha}","git_commits_url":"https://api.github.com/repos/stoplightio/prism/git/commits{/sha}","comments_url":"https://api.github.com/repos/stoplightio/prism/comments{/number}","issue_comment_url":"https://api.github.com/repos/stoplightio/prism/issues/comments{/number}","contents_url":"https://api.github.com/repos/stoplightio/prism/contents/{+path}","compare_url":"https://api.github.com/repos/stoplightio/prism/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stoplightio/prism/merges","archive_url":"https://api.github.com/repos/stoplightio/prism/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stoplightio/prism/downloads","issues_url":"https://api.github.com/repos/stoplightio/prism/issues{/number}","pulls_url":"https://api.github.com/repos/stoplightio/prism/pulls{/number}","milestones_url":"https://api.github.com/repos/stoplightio/prism/milestones{/number}","notifications_url":"https://api.github.com/repos/stoplightio/prism/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stoplightio/prism/labels{/name}","releases_url":"https://api.github.com/repos/stoplightio/prism/releases{/id}","deployments_url":"https://api.github.com/repos/stoplightio/prism/deployments","created_at":"2016-03-18T03:52:09Z","updated_at":"2018-10-19T11:22:32Z","pushed_at":"2018-10-19T14:58:54Z","git_url":"git://github.com/stoplightio/prism.git","ssh_url":"git@github.com:stoplightio/prism.git","clone_url":"https://github.com/stoplightio/prism.git","svn_url":"https://github.com/stoplightio/prism","homepage":"https://stoplight.io/platform/prism","size":360,"stargazers_count":136,"watchers_count":136,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":62,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":11,"open_issues":62,"watchers":136,"default_branch":"2.x"}},"_links":{"self":{"href":"https://api.github.com/repos/stoplightio/prism/pulls/159"},"html":{"href":"https://github.com/stoplightio/prism/pull/159"},"issue":{"href":"https://api.github.com/repos/stoplightio/prism/issues/159"},"comments":{"href":"https://api.github.com/repos/stoplightio/prism/issues/159/comments"},"review_comments":{"href":"https://api.github.com/repos/stoplightio/prism/pulls/159/comments"},"review_comment":{"href":"https://api.github.com/repos/stoplightio/prism/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stoplightio/prism/pulls/159/commits"},"statuses":{"href":"https://api.github.com/repos/stoplightio/prism/statuses/3eb957b57f1e91b21a34c78939e1f37fbd6a1abb"}},"author_association":"NONE"}}
{"actor":{"display_login":"StefanDywersant"}}