{"action":"opened","issue":{"url":"https://api.github.com/repos/sdwolfe32/trumail/issues/36","repository_url":"https://api.github.com/repos/sdwolfe32/trumail","labels_url":"https://api.github.com/repos/sdwolfe32/trumail/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/sdwolfe32/trumail/issues/36/comments","events_url":"https://api.github.com/repos/sdwolfe32/trumail/issues/36/events","html_url":"https://github.com/sdwolfe32/trumail/issues/36","id":315930252,"number":36,"title":"400 Bad request","user":{"login":"danilopaulinodasilva","id":5751920,"avatar_url":"https://avatars1.githubusercontent.com/u/5751920?v=4","gravatar_id":"","url":"https://api.github.com/users/danilopaulinodasilva","html_url":"https://github.com/danilopaulinodasilva","followers_url":"https://api.github.com/users/danilopaulinodasilva/followers","following_url":"https://api.github.com/users/danilopaulinodasilva/following{/other_user}","gists_url":"https://api.github.com/users/danilopaulinodasilva/gists{/gist_id}","starred_url":"https://api.github.com/users/danilopaulinodasilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danilopaulinodasilva/subscriptions","organizations_url":"https://api.github.com/users/danilopaulinodasilva/orgs","repos_url":"https://api.github.com/users/danilopaulinodasilva/repos","events_url":"https://api.github.com/users/danilopaulinodasilva/events{/privacy}","received_events_url":"https://api.github.com/users/danilopaulinodasilva/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-19T15:32:56Z","updated_at":"2018-04-19T15:32:56Z","closed_at":null,"author_association":"NONE","body":"Hi! First, thanks for this beautiful tool :)\r\n\r\nI'm running some initial tests and:\r\n- Browser: OK\r\n- Postman: OK\r\n- PHP cURL: Fail\r\n\r\nWhen I try to use a cURL call in server-side with PHP I'm getting error 400 Bad request:\r\n\r\n`<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<html><head>\r\n<title>400 Bad Request</title>\r\n</head><body>\r\n<h1>Bad Request</h1>\r\n<p>Your browser sent a request that this server could not understand.<br />\r\n</p>\r\n<p>Additionally, a 400 Bad Request\r\nerror was encountered while trying to use an ErrorDocument to handle the request.</p>\r\n<hr>\r\n<address>Apache Server at proxy-subdomains-vhost.localhost Port 80</address>\r\n</body></html>\r\n`\r\nAnd there is my PHP cURL call:\r\n`$curl = curl_init();\r\n\r\ncurl_setopt_array($curl, array(\r\n  CURLOPT_URL => \"https://trumail.io/jsonp/\"+$email,\r\n  CURLOPT_RETURNTRANSFER => true,\r\n  CURLOPT_ENCODING => \"\",\r\n  CURLOPT_MAXREDIRS => 10,\r\n  CURLOPT_TIMEOUT => 30,\r\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\r\n  CURLOPT_CUSTOMREQUEST => \"GET\",\r\n  CURLOPT_HTTPHEADER => array(\r\n    \"Cache-Control: no-cache\",\r\n    \"Postman-Token: e9f6dfcb-e4d6-45b9-bd0f-59cd9b56208e\"\r\n  ),\r\n));\r\n\r\n$response = curl_exec($curl);\r\n$err = curl_error($curl);\r\n\r\ncurl_close($curl);\r\n\r\nif ($err) {\r\n  echo \"cURL Error #:\" . $err;\r\n} else {\r\n  echo $response;\r\n}`\r\n\r\nI'm doing something wrong here? Thanks."}}
{"actor":{"display_login":"danilopaulinodasilva"}}