{"action":"created","comment":{"url":"https://api.github.com/repos/thomas-33across/prebid-server/pulls/comments/227456557","pull_request_review_id":167501402,"id":227456557,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzQ1NjU1Nw==","diff_hunk":"@@ -0,0 +1,77 @@\n+package ttx\n+\n+import (\n+\t\"encoding/json\"\n+\t\"fmt\"\n+\t\"github.com/mxmCherry/openrtb\"\n+\t\"github.com/prebid/prebid-server/adapters\"\n+\t\"github.com/prebid/prebid-server/errortypes\"\n+\t\"net/http\"\n+)\n+\n+type TtxAdapter struct {\n+\tendpoint string\n+}\n+\n+func (a *TtxAdapter) MakeRequests(request *openrtb.BidRequest) ([]*adapters.RequestData, []error) {\n+\tvar errs []error\n+\tjsonData, err := json.Marshal(request)\n+\n+\tif err != nil {\n+\t\terrs = append(errs, err)\n+\t\treturn nil, errs\n+\t}\n+\n+\theaders := http.Header{}\n+\theaders.Add(\"Content-Type\", \"application/json;charset=utf-8\")\n+\treqData := []*adapters.RequestData{{\n+\t\tMethod:  \"POST\",\n+\t\tUri:     a.endpoint,\n+\t\tBody:    jsonData,\n+\t\tHeaders: headers,\n+\t}}\n+\n+\treturn reqData, errs\n+}\n+\n+func (a *TtxAdapter) MakeBids(internalRequest *openrtb.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) {\n+\tif response.StatusCode == http.StatusNoContent {\n+\t\treturn nil, nil\n+\t}\n+\n+\tif response.StatusCode == http.StatusBadRequest {\n+\t\treturn nil, []error{&errortypes.BadInput{\n+\t\t\tMessage: fmt.Sprintf(\"Unexpected status code: %d. Run with request.debug = 1 for more info\", response.StatusCode),\n+\t\t}}\n+\t}\n+\n+\tif response.StatusCode != http.StatusOK {","path":"adapters/ttx/ttx.go","position":48,"original_position":48,"commit_id":"657f29f9888188c0da0c67ffe086e87614e91d1d","original_commit_id":"657f29f9888188c0da0c67ffe086e87614e91d1d","user":{"login":"briandamaged","id":372750,"node_id":"MDQ6VXNlcjM3Mjc1MA==","avatar_url":"https://avatars1.githubusercontent.com/u/372750?v=4","gravatar_id":"","url":"https://api.github.com/users/briandamaged","html_url":"https://github.com/briandamaged","followers_url":"https://api.github.com/users/briandamaged/followers","following_url":"https://api.github.com/users/briandamaged/following{/other_user}","gists_url":"https://api.github.com/users/briandamaged/gists{/gist_id}","starred_url":"https://api.github.com/users/briandamaged/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briandamaged/subscriptions","organizations_url":"https://api.github.com/users/briandamaged/orgs","repos_url":"https://api.github.com/users/briandamaged/repos","events_url":"https://api.github.com/users/briandamaged/events{/privacy}","received_events_url":"https://api.github.com/users/briandamaged/received_events","type":"User","site_admin":false},"body":"I mean: what happens if somebody configures the Prebid server incorrectly, and the specify this URL:\r\n\r\n```\r\nhttps://ssc.33across.com/api/v1/s2s/\r\n```\r\n\r\nInstead of this one:\r\n\r\n```\r\nhttps://ssc.33across.com/api/v1/s2s\r\n```\r\n\r\nIs Prebid smart enough to handle the redirect behind the scenes?  Or, will this cause the request to error out?","created_at":"2018-10-23T15:52:45Z","updated_at":"2018-10-23T15:52:45Z","html_url":"https://github.com/thomas-33across/prebid-server/pull/1#discussion_r227456557","pull_request_url":"https://api.github.com/repos/thomas-33across/prebid-server/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/thomas-33across/prebid-server/pulls/comments/227456557"},"html":{"href":"https://github.com/thomas-33across/prebid-server/pull/1#discussion_r227456557"},"pull_request":{"href":"https://api.github.com/repos/thomas-33across/prebid-server/pulls/1"}},"in_reply_to_id":226352323},"pull_request":{"url":"https://api.github.com/repos/thomas-33across/prebid-server/pulls/1","id":222563701,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNTYzNzAx","html_url":"https://github.com/thomas-33across/prebid-server/pull/1","diff_url":"https://github.com/thomas-33across/prebid-server/pull/1.diff","patch_url":"https://github.com/thomas-33across/prebid-server/pull/1.patch","issue_url":"https://api.github.com/repos/thomas-33across/prebid-server/issues/1","number":1,"state":"open","locked":false,"title":"adding TTX Bidder","user":{"login":"thomas-33across","id":44033452,"node_id":"MDQ6VXNlcjQ0MDMzNDUy","avatar_url":"https://avatars3.githubusercontent.com/u/44033452?v=4","gravatar_id":"","url":"https://api.github.com/users/thomas-33across","html_url":"https://github.com/thomas-33across","followers_url":"https://api.github.com/users/thomas-33across/followers","following_url":"https://api.github.com/users/thomas-33across/following{/other_user}","gists_url":"https://api.github.com/users/thomas-33across/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-33across/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-33across/subscriptions","organizations_url":"https://api.github.com/users/thomas-33across/orgs","repos_url":"https://api.github.com/users/thomas-33across/repos","events_url":"https://api.github.com/users/thomas-33across/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-33across/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-12T19:26:55Z","updated_at":"2018-10-23T15:52:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26d484396c084c11e4f6c6ee8de6de80f5786784","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/thomas-33across/prebid-server/pulls/1/commits","review_comments_url":"https://api.github.com/repos/thomas-33across/prebid-server/pulls/1/comments","review_comment_url":"https://api.github.com/repos/thomas-33across/prebid-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thomas-33across/prebid-server/issues/1/comments","statuses_url":"https://api.github.com/repos/thomas-33across/prebid-server/statuses/657f29f9888188c0da0c67ffe086e87614e91d1d","head":{"label":"thomas-33across:add_new_bidder_ttx","ref":"add_new_bidder_ttx","sha":"657f29f9888188c0da0c67ffe086e87614e91d1d","user":{"login":"thomas-33across","id":44033452,"node_id":"MDQ6VXNlcjQ0MDMzNDUy","avatar_url":"https://avatars3.githubusercontent.com/u/44033452?v=4","gravatar_id":"","url":"https://api.github.com/users/thomas-33across","html_url":"https://github.com/thomas-33across","followers_url":"https://api.github.com/users/thomas-33across/followers","following_url":"https://api.github.com/users/thomas-33across/following{/other_user}","gists_url":"https://api.github.com/users/thomas-33across/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-33across/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-33across/subscriptions","organizations_url":"https://api.github.com/users/thomas-33across/orgs","repos_url":"https://api.github.com/users/thomas-33across/repos","events_url":"https://api.github.com/users/thomas-33across/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-33across/received_events","type":"User","site_admin":false},"repo":{"id":152469484,"node_id":"MDEwOlJlcG9zaXRvcnkxNTI0Njk0ODQ=","name":"prebid-server","full_name":"thomas-33across/prebid-server","private":false,"owner":{"login":"thomas-33across","id":44033452,"node_id":"MDQ6VXNlcjQ0MDMzNDUy","avatar_url":"https://avatars3.githubusercontent.com/u/44033452?v=4","gravatar_id":"","url":"https://api.github.com/users/thomas-33across","html_url":"https://github.com/thomas-33across","followers_url":"https://api.github.com/users/thomas-33across/followers","following_url":"https://api.github.com/users/thomas-33across/following{/other_user}","gists_url":"https://api.github.com/users/thomas-33across/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-33across/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-33across/subscriptions","organizations_url":"https://api.github.com/users/thomas-33across/orgs","repos_url":"https://api.github.com/users/thomas-33across/repos","events_url":"https://api.github.com/users/thomas-33across/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-33across/received_events","type":"User","site_admin":false},"html_url":"https://github.com/thomas-33across/prebid-server","description":"Server side component to offload prebid processing to the cloud","fork":true,"url":"https://api.github.com/repos/thomas-33across/prebid-server","forks_url":"https://api.github.com/repos/thomas-33across/prebid-server/forks","keys_url":"https://api.github.com/repos/thomas-33across/prebid-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thomas-33across/prebid-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thomas-33across/prebid-server/teams","hooks_url":"https://api.github.com/repos/thomas-33across/prebid-server/hooks","issue_events_url":"https://api.github.com/repos/thomas-33across/prebid-server/issues/events{/number}","events_url":"https://api.github.com/repos/thomas-33across/prebid-server/events","assignees_url":"https://api.github.com/repos/thomas-33across/prebid-server/assignees{/user}","branches_url":"https://api.github.com/repos/thomas-33across/prebid-server/branches{/branch}","tags_url":"https://api.github.com/repos/thomas-33across/prebid-server/tags","blobs_url":"https://api.github.com/repos/thomas-33across/prebid-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thomas-33across/prebid-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thomas-33across/prebid-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/thomas-33across/prebid-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thomas-33across/prebid-server/statuses/{sha}","languages_url":"https://api.github.com/repos/thomas-33across/prebid-server/languages","stargazers_url":"https://api.github.com/repos/thomas-33across/prebid-server/stargazers","contributors_url":"https://api.github.com/repos/thomas-33across/prebid-server/contributors","subscribers_url":"https://api.github.com/repos/thomas-33across/prebid-server/subscribers","subscription_url":"https://api.github.com/repos/thomas-33across/prebid-server/subscription","commits_url":"https://api.github.com/repos/thomas-33across/prebid-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/thomas-33across/prebid-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/thomas-33across/prebid-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/thomas-33across/prebid-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/thomas-33across/prebid-server/contents/{+path}","compare_url":"https://api.github.com/repos/thomas-33across/prebid-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thomas-33across/prebid-server/merges","archive_url":"https://api.github.com/repos/thomas-33across/prebid-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thomas-33across/prebid-server/downloads","issues_url":"https://api.github.com/repos/thomas-33across/prebid-server/issues{/number}","pulls_url":"https://api.github.com/repos/thomas-33across/prebid-server/pulls{/number}","milestones_url":"https://api.github.com/repos/thomas-33across/prebid-server/milestones{/number}","notifications_url":"https://api.github.com/repos/thomas-33across/prebid-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thomas-33across/prebid-server/labels{/name}","releases_url":"https://api.github.com/repos/thomas-33across/prebid-server/releases{/id}","deployments_url":"https://api.github.com/repos/thomas-33across/prebid-server/deployments","created_at":"2018-10-10T18:18:29Z","updated_at":"2018-10-10T18:18:32Z","pushed_at":"2018-10-16T17:12:40Z","git_url":"git://github.com/thomas-33across/prebid-server.git","ssh_url":"git@github.com:thomas-33across/prebid-server.git","clone_url":"https://github.com/thomas-33across/prebid-server.git","svn_url":"https://github.com/thomas-33across/prebid-server","homepage":null,"size":8151,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"thomas-33across:master","ref":"master","sha":"7816a09d67e4f52291bf5d1293941b605b8e80ae","user":{"login":"thomas-33across","id":44033452,"node_id":"MDQ6VXNlcjQ0MDMzNDUy","avatar_url":"https://avatars3.githubusercontent.com/u/44033452?v=4","gravatar_id":"","url":"https://api.github.com/users/thomas-33across","html_url":"https://github.com/thomas-33across","followers_url":"https://api.github.com/users/thomas-33across/followers","following_url":"https://api.github.com/users/thomas-33across/following{/other_user}","gists_url":"https://api.github.com/users/thomas-33across/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-33across/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-33across/subscriptions","organizations_url":"https://api.github.com/users/thomas-33across/orgs","repos_url":"https://api.github.com/users/thomas-33across/repos","events_url":"https://api.github.com/users/thomas-33across/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-33across/received_events","type":"User","site_admin":false},"repo":{"id":152469484,"node_id":"MDEwOlJlcG9zaXRvcnkxNTI0Njk0ODQ=","name":"prebid-server","full_name":"thomas-33across/prebid-server","private":false,"owner":{"login":"thomas-33across","id":44033452,"node_id":"MDQ6VXNlcjQ0MDMzNDUy","avatar_url":"https://avatars3.githubusercontent.com/u/44033452?v=4","gravatar_id":"","url":"https://api.github.com/users/thomas-33across","html_url":"https://github.com/thomas-33across","followers_url":"https://api.github.com/users/thomas-33across/followers","following_url":"https://api.github.com/users/thomas-33across/following{/other_user}","gists_url":"https://api.github.com/users/thomas-33across/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-33across/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-33across/subscriptions","organizations_url":"https://api.github.com/users/thomas-33across/orgs","repos_url":"https://api.github.com/users/thomas-33across/repos","events_url":"https://api.github.com/users/thomas-33across/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-33across/received_events","type":"User","site_admin":false},"html_url":"https://github.com/thomas-33across/prebid-server","description":"Server side component to offload prebid processing to the cloud","fork":true,"url":"https://api.github.com/repos/thomas-33across/prebid-server","forks_url":"https://api.github.com/repos/thomas-33across/prebid-server/forks","keys_url":"https://api.github.com/repos/thomas-33across/prebid-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thomas-33across/prebid-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thomas-33across/prebid-server/teams","hooks_url":"https://api.github.com/repos/thomas-33across/prebid-server/hooks","issue_events_url":"https://api.github.com/repos/thomas-33across/prebid-server/issues/events{/number}","events_url":"https://api.github.com/repos/thomas-33across/prebid-server/events","assignees_url":"https://api.github.com/repos/thomas-33across/prebid-server/assignees{/user}","branches_url":"https://api.github.com/repos/thomas-33across/prebid-server/branches{/branch}","tags_url":"https://api.github.com/repos/thomas-33across/prebid-server/tags","blobs_url":"https://api.github.com/repos/thomas-33across/prebid-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thomas-33across/prebid-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thomas-33across/prebid-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/thomas-33across/prebid-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thomas-33across/prebid-server/statuses/{sha}","languages_url":"https://api.github.com/repos/thomas-33across/prebid-server/languages","stargazers_url":"https://api.github.com/repos/thomas-33across/prebid-server/stargazers","contributors_url":"https://api.github.com/repos/thomas-33across/prebid-server/contributors","subscribers_url":"https://api.github.com/repos/thomas-33across/prebid-server/subscribers","subscription_url":"https://api.github.com/repos/thomas-33across/prebid-server/subscription","commits_url":"https://api.github.com/repos/thomas-33across/prebid-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/thomas-33across/prebid-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/thomas-33across/prebid-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/thomas-33across/prebid-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/thomas-33across/prebid-server/contents/{+path}","compare_url":"https://api.github.com/repos/thomas-33across/prebid-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thomas-33across/prebid-server/merges","archive_url":"https://api.github.com/repos/thomas-33across/prebid-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thomas-33across/prebid-server/downloads","issues_url":"https://api.github.com/repos/thomas-33across/prebid-server/issues{/number}","pulls_url":"https://api.github.com/repos/thomas-33across/prebid-server/pulls{/number}","milestones_url":"https://api.github.com/repos/thomas-33across/prebid-server/milestones{/number}","notifications_url":"https://api.github.com/repos/thomas-33across/prebid-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thomas-33across/prebid-server/labels{/name}","releases_url":"https://api.github.com/repos/thomas-33across/prebid-server/releases{/id}","deployments_url":"https://api.github.com/repos/thomas-33across/prebid-server/deployments","created_at":"2018-10-10T18:18:29Z","updated_at":"2018-10-10T18:18:32Z","pushed_at":"2018-10-16T17:12:40Z","git_url":"git://github.com/thomas-33across/prebid-server.git","ssh_url":"git@github.com:thomas-33across/prebid-server.git","clone_url":"https://github.com/thomas-33across/prebid-server.git","svn_url":"https://github.com/thomas-33across/prebid-server","homepage":null,"size":8151,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thomas-33across/prebid-server/pulls/1"},"html":{"href":"https://github.com/thomas-33across/prebid-server/pull/1"},"issue":{"href":"https://api.github.com/repos/thomas-33across/prebid-server/issues/1"},"comments":{"href":"https://api.github.com/repos/thomas-33across/prebid-server/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/thomas-33across/prebid-server/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/thomas-33across/prebid-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thomas-33across/prebid-server/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/thomas-33across/prebid-server/statuses/657f29f9888188c0da0c67ffe086e87614e91d1d"}},"author_association":"OWNER"}}
{"actor":{"display_login":"briandamaged"}}