{"action":"created","issue":{"url":"https://api.github.com/repos/hillelcoren/invoice-ninja/issues/307","labels_url":"https://api.github.com/repos/hillelcoren/invoice-ninja/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/hillelcoren/invoice-ninja/issues/307/comments","events_url":"https://api.github.com/repos/hillelcoren/invoice-ninja/issues/307/events","html_url":"https://github.com/hillelcoren/invoice-ninja/issues/307","id":75738471,"number":307,"title":"v2.0.1 curl to api failure","user":{"login":"cytech","id":7809634,"avatar_url":"https://avatars.githubusercontent.com/u/7809634?v=3","gravatar_id":"","url":"https://api.github.com/users/cytech","html_url":"https://github.com/cytech","followers_url":"https://api.github.com/users/cytech/followers","following_url":"https://api.github.com/users/cytech/following{/other_user}","gists_url":"https://api.github.com/users/cytech/gists{/gist_id}","starred_url":"https://api.github.com/users/cytech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cytech/subscriptions","organizations_url":"https://api.github.com/users/cytech/orgs","repos_url":"https://api.github.com/users/cytech/repos","events_url":"https://api.github.com/users/cytech/events{/privacy}","received_events_url":"https://api.github.com/users/cytech/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-05-12T21:06:17Z","updated_at":"2015-05-14T05:18:54Z","closed_at":"2015-05-14T05:18:54Z","body":"call to api via curl returns debug info/script\r\ncommand - curl -X GET invoice-ninja/api/v1/clients -H \"X-Ninja-Token: davetoken...\"\r\n(replaced token in this post with \"davetoken..\")\r\nrun without token returns \"invalid token\" as expected.\r\nrun curl (that worked in 1.7 returns):\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"http://invoice-ninja/_debugbar/assets/stylesheets?1425741323\">\r\n<script type=\"text/javascript\" src=\"http://invoice-ninja/_debugbar/assets/javascript?1423122680\"></script>\r\n<script type=\"text/javascript\">jQuery.noConflict(true);</script>\r\n<script type=\"text/javascript\">\r\nvar phpdebugbar = new PhpDebugBar.DebugBar();\r\nphpdebugbar.addTab(\"messages\", new PhpDebugBar.DebugBar.Tab({\"icon\":\"list-alt\",\"title\":\"Messages\", \"widget\": new PhpDebugBar.Widgets.MessagesWidget()}));\r\nphpdebugbar.addIndicator(\"time\", new PhpDebugBar.DebugBar.Indicator({\"icon\":\"clock-o\",\"tooltip\":\"Request Duration\"}), \"right\");\r\nphpdebugbar.addTab(\"timeline\", new PhpDebugBar.DebugBar.Tab({\"icon\":\"tasks\",\"title\":\"Timeline\", \"widget\": new PhpDebugBar.Widgets.TimelineWidget()}));\r\nphpdebugbar.addIndicator(\"memory\", new PhpDebugBar.DebugBar.Indicator({\"icon\":\"cogs\",\"tooltip\":\"Memory Usage\"}), \"right\");\r\nphpdebugbar.addTab(\"exceptions\", new PhpDebugBar.DebugBar.Tab({\"icon\":\"bug\",\"title\":\"Exceptions\", \"widget\": new PhpDebugBar.Widgets.ExceptionsWidget()}));\r\nphpdebugbar.addTab(\"views\", new PhpDebugBar.DebugBar.Tab({\"icon\":\"leaf\",\"title\":\"Views\", \"widget\": new PhpDebugBar.Widgets.TemplatesWidget()}));\r\nphpdebugbar.addTab(\"route\", new PhpDebugBar.DebugBar.Tab({\"icon\":\"share\",\"title\":\"Route\", \"widget\": new PhpDebugBar.Widgets.VariableListWidget()}));\r\nphpdebugbar.addIndicator(\"currentroute\", new PhpDebugBar.DebugBar.Indicator({\"icon\":\"share\",\"tooltip\":\"Route\"}), \"right\");\r\nphpdebugbar.addTab(\"queries\", new PhpDebugBar.DebugBar.Tab({\"icon\":\"inbox\",\"title\":\"Queries\", \"widget\": new PhpDebugBar.Widgets.SQLQueriesWidget()}));\r\nphpdebugbar.addTab(\"emails\", new PhpDebugBar.DebugBar.Tab({\"icon\":\"inbox\",\"title\":\"Mails\", \"widget\": new PhpDebugBar.Widgets.MailsWidget()}));\r\nphpdebugbar.addTab(\"request\", new PhpDebugBar.DebugBar.Tab({\"icon\":\"tags\",\"title\":\"Request\", \"widget\": new PhpDebugBar.Widgets.VariableListWidget()}));\r\nphpdebugbar.setDataMap({\r\n\"messages\": [\"messages.messages\", []],\r\n\"messages:badge\": [\"messages.count\", null],\r\n\"time\": [\"time.duration_str\", '0ms'],\r\n\"timeline\": [\"time\", {}],\r\n\"memory\": [\"memory.peak_usage_str\", '0B'],\r\n\"exceptions\": [\"exceptions.exceptions\", []],\r\n\"exceptions:badge\": [\"exceptions.count\", null],\r\n\"views\": [\"views\", []],\r\n\"views:badge\": [\"views.nb_templates\", 0],\r\n\"route\": [\"route\", {}],\r\n\"currentroute\": [\"route.uri\", ],\r\n\"queries\": [\"queries\", []],\r\n\"queries:badge\": [\"queries.nb_statements\", 0],\r\n\"emails\": [\"swiftmailer_mails.mails\", []],\r\n\"emails:badge\": [\"swiftmailer_mails.count\", null],\r\n\"request\": [\"request\", {}]\r\n});\r\nphpdebugbar.restoreState();\r\nphpdebugbar.ajaxHandler = new PhpDebugBar.AjaxHandler(phpdebugbar);\r\nphpdebugbar.ajaxHandler.bindToXHR();\r\nphpdebugbar.setOpenHandler(new PhpDebugBar.OpenHandler({\"url\":\"http:\\/\\/invoice-ninja\\/_debugbar\\/open\"}));\r\nphpdebugbar.addDataSet({\"__meta\":{\"id\":\"a97f31f0a6664a02cda98998baafd8a4\",\"datetime\":\"2015-05-12 21:00:15\",\"utime\":1431464415.3753,\"method\":\"GET\",\"uri\":\"\\/api\\/v1\\/clients\",\"ip\":\"192.168.1.20\"},\"php\":{\"version\":\"5.5.9-1ubuntu4.9\"},\"messages\":{\"count\":0,\"messages\":[]},\"time\":{\"start\":1431464415.2561,\"end\":1431464415.3753,\"duration\":0.11920404434204,\"duration_str\":\"119.2ms\",\"measures\":[{\"label\":\"Booting\",\"start\":1431464415.2561,\"relative_start\":0,\"end\":1431464415.3327,\"relative_end\":1431464415.3327,\"duration\":0.076573848724365,\"duration_str\":\"76.57ms\",\"params\":[],\"collector\":null},{\"label\":\"Application\",\"start\":1431464415.3544,\"relative_start\":0.098288059234619,\"end\":1431464415.373,\"relative_end\":1431464415.373,\"duration\":0.018613815307617,\"duration_str\":\"18.61ms\",\"params\":[],\"collector\":null},{\"label\":\"After application\",\"start\":1431464415.3731,\"relative_start\":0.11693096160889,\"end\":1431464415.3754,\"relative_end\":5.9604644775391e-6,\"duration\":0.0022790431976318,\"duration_str\":\"2.28ms\",\"params\":[],\"collector\":null}]},\"memory\":{\"peak_usage\":5767168,\"peak_usage_str\":\"5.5MB\"},\"exceptions\":{\"count\":0,\"exceptions\":[]},\"views\":{\"nb_templates\":0,\"templates\":[]},\"route\":{\"uri\":\"GET api\\/v1\\/clients\",\"middleware\":\"api\",\"as\":\"api.v1.clients.index\",\"controller\":\"App\\\\Http\\\\Controllers\\\\ClientApiController@index\",\"namespace\":\"App\\\\Http\\\\Controllers\",\"prefix\":\"\\/api\\/v1\",\"where\":[],\"file\":\"app\\/Http\\/Controllers\\/ClientApiController.php:25-34\"},\"queries\":{\"nb_statements\":3,\"nb_failed_statements\":0,\"accumulated_duration\":0.00205,\"accumulated_duration_str\":\"2.05ms\",\"statements\":[{\"sql\":\"select * from information_schema.tables where table_schema = 'ninja' and table_name = 'accounts'\",\"params\":{\"0\":\"ninja\",\"1\":\"accounts\",\"hints\":\"Use <code>SELECT *<\\/code> only if you need all columns from table\"},\"duration\":0.00099,\"duration_str\":\"990\\u03bcs\",\"stmt_id\":null,\"connection\":\"ninja\"},{\"sql\":\"select `id`, `user_id` from `account_tokens` where `account_tokens`.`deleted_at` is null and `token` = 'davetoken...' limit 1\",\"params\":{\"0\":\"davetoken...\",\"hints\":\"<code>LIMIT<\\/code> without <code>ORDER BY<\\/code> causes non-deterministic results, depending on the query execution plan\"},\"duration\":0.00048,\"duration_str\":\"480\\u03bcs\",\"stmt_id\":null,\"connection\":\"ninja\"},{\"sql\":\"select * from `users` where `users`.`deleted_at` is null and `users`.`id` = '1' limit 1\",\"params\":{\"0\":\"1\",\"hints\":\"Use <code>SELECT *<\\/code> only if you need all columns from table<br \\/><code>LIMIT<\\/code> without <code>ORDER BY<\\/code> causes non-deterministic results, depending on the query execution plan\"},\"duration\":0.00058,\"duration_str\":\"580\\u03bcs\",\"stmt_id\":null,\"connection\":\"ninja\"}]},\"swiftmailer_mails\":{\"count\":0,\"mails\":[]},\"request\":{\"format\":\"html\",\"content_type\":\"text\\/html; charset=UTF-8\",\"status_text\":\"OK\",\"status_code\":\"200\",\"request_query\":\"[]\",\"request_request\":\"[]\",\"request_headers\":\"array:4 [\\n  \\\"user-agent\\\" => array:1 [\\n    0 => \\\"curl\\/7.38.0\\\"\\n  ]\\n  \\\"host\\\" => array:1 [\\n    0 => \\\"invoice-ninja\\\"\\n  ]\\n  \\\"accept\\\" => array:1 [\\n    0 => \\\"*\\/*\\\"\\n  ]\\n  \\\"x-ninja-token\\\" => array:1 [\\n    0 => \\\"davetoken...\\\"\\n  ]\\n]\",\"request_server\":\"array:29 [\\n  \\\"REDIRECT_STATUS\\\" => \\\"200\\\"\\n  \\\"HTTP_USER_AGENT\\\" => \\\"curl\\/7.38.0\\\"\\n  \\\"HTTP_HOST\\\" => \\\"invoice-ninja\\\"\\n  \\\"HTTP_ACCEPT\\\" => \\\"*\\/*\\\"\\n  \\\"HTTP_X_NINJA_TOKEN\\\" => \\\"davetoken...\\\"\\n  \\\"PATH\\\" => \\\"\\/usr\\/local\\/sbin:\\/usr\\/local\\/bin:\\/usr\\/sbin:\\/usr\\/bin:\\/sbin:\\/bin\\\"\\n  \\\"SERVER_SIGNATURE\\\" => \\\"\\\"\\\"\\n    <address>Apache\\/2.4.7 (Ubuntu) Server at invoice-ninja Port 80<\\/address>\\n    \\\"\\\"\\\"\\n  \\\"SERVER_SOFTWARE\\\" => \\\"Apache\\/2.4.7 (Ubuntu)\\\"\\n  \\\"SERVER_NAME\\\" => \\\"invoice-ninja\\\"\\n  \\\"SERVER_ADDR\\\" => \\\"192.168.1.10\\\"\\n  \\\"SERVER_PORT\\\" => \\\"80\\\"\\n  \\\"REMOTE_ADDR\\\" => \\\"192.168.1.20\\\"\\n  \\\"DOCUMENT_ROOT\\\" => \\\"\\/var\\/www\\/invoice-ninja\\/public\\\"\\n  \\\"REQUEST_SCHEME\\\" => \\\"http\\\"\\n  \\\"CONTEXT_PREFIX\\\" => \\\"\\\"\\n  \\\"CONTEXT_DOCUMENT_ROOT\\\" => \\\"\\/var\\/www\\/invoice-ninja\\/public\\\"\\n  \\\"SERVER_ADMIN\\\" => \\\"webmaster@localhost\\\"\\n  \\\"SCRIPT_FILENAME\\\" => \\\"\\/var\\/www\\/invoice-ninja\\/public\\/index.php\\\"\\n  \\\"REMOTE_PORT\\\" => \\\"50011\\\"\\n  \\\"REDIRECT_URL\\\" => \\\"\\/api\\/v1\\/clients\\\"\\n  \\\"GATEWAY_INTERFACE\\\" => \\\"CGI\\/1.1\\\"\\n  \\\"SERVER_PROTOCOL\\\" => \\\"HTTP\\/1.1\\\"\\n  \\\"REQUEST_METHOD\\\" => \\\"GET\\\"\\n  \\\"QUERY_STRING\\\" => \\\"\\\"\\n  \\\"REQUEST_URI\\\" => \\\"\\/api\\/v1\\/clients\\\"\\n  \\\"SCRIPT_NAME\\\" => \\\"\\/index.php\\\"\\n  \\\"PHP_SELF\\\" => \\\"\\/index.php\\\"\\n  \\\"REQUEST_TIME_FLOAT\\\" => 1431464415.255\\n  \\\"REQUEST_TIME\\\" => 1431464415\\n]\",\"request_cookies\":\"[]\",\"response_headers\":\"array:3 [\\n  \\\"cache-control\\\" => array:1 [\\n    0 => \\\"no-cache\\\"\\n  ]\\n  \\\"date\\\" => array:1 [\\n    0 => \\\"Tue, 12 May 2015 21:00:15 GMT\\\"\\n  ]\\n  \\\"content-type\\\" => array:1 [\\n    0 => \\\"text\\/html; charset=UTF-8\\\"\\n  ]\\n]\",\"path_info\":\"\\/api\\/v1\\/clients\",\"session_attributes\":\"array:4 [\\n  \\\"_token\\\" => \\\"6hYzt7pHZjIf8ogK7IsqSGLYDDcYvY8tb10wbGZ6\\\"\\n  \\\"login_82e5d2c56bdd0811318f0cf078b78bfc\\\" => \\\"1\\\"\\n  \\\"token_id\\\" => \\\"1\\\"\\n  \\\"PHPDEBUGBAR_STACK_DATA\\\" => []\\n]\"}}, \"a97f31f0a6664a02cda98998baafd8a4\");\r\n\r\n</script>\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/hillelcoren/invoice-ninja/issues/comments/101916162","html_url":"https://github.com/hillelcoren/invoice-ninja/issues/307#issuecomment-101916162","issue_url":"https://api.github.com/repos/hillelcoren/invoice-ninja/issues/307","id":101916162,"user":{"login":"hillelcoren","id":4629496,"avatar_url":"https://avatars.githubusercontent.com/u/4629496?v=3","gravatar_id":"","url":"https://api.github.com/users/hillelcoren","html_url":"https://github.com/hillelcoren","followers_url":"https://api.github.com/users/hillelcoren/followers","following_url":"https://api.github.com/users/hillelcoren/following{/other_user}","gists_url":"https://api.github.com/users/hillelcoren/gists{/gist_id}","starred_url":"https://api.github.com/users/hillelcoren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hillelcoren/subscriptions","organizations_url":"https://api.github.com/users/hillelcoren/orgs","repos_url":"https://api.github.com/users/hillelcoren/repos","events_url":"https://api.github.com/users/hillelcoren/events{/privacy}","received_events_url":"https://api.github.com/users/hillelcoren/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T05:18:54Z","updated_at":"2015-05-14T05:18:54Z","body":"Thanks for letting us know, sorry for taking up your time with this. "}}