{"action":"created","issue":{"url":"https://api.github.com/repos/scrapinghub/splash/issues/477","repository_url":"https://api.github.com/repos/scrapinghub/splash","labels_url":"https://api.github.com/repos/scrapinghub/splash/issues/477/labels{/name}","comments_url":"https://api.github.com/repos/scrapinghub/splash/issues/477/comments","events_url":"https://api.github.com/repos/scrapinghub/splash/issues/477/events","html_url":"https://github.com/scrapinghub/splash/issues/477","id":163527885,"number":477,"title":"When I send request with lua script, I got 400 error","user":{"login":"gamelife1314","id":10297148,"avatar_url":"https://avatars.githubusercontent.com/u/10297148?v=3","gravatar_id":"","url":"https://api.github.com/users/gamelife1314","html_url":"https://github.com/gamelife1314","followers_url":"https://api.github.com/users/gamelife1314/followers","following_url":"https://api.github.com/users/gamelife1314/following{/other_user}","gists_url":"https://api.github.com/users/gamelife1314/gists{/gist_id}","starred_url":"https://api.github.com/users/gamelife1314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gamelife1314/subscriptions","organizations_url":"https://api.github.com/users/gamelife1314/orgs","repos_url":"https://api.github.com/users/gamelife1314/repos","events_url":"https://api.github.com/users/gamelife1314/events{/privacy}","received_events_url":"https://api.github.com/users/gamelife1314/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-02T17:17:24Z","updated_at":"2016-07-05T09:17:20Z","closed_at":null,"body":"`# coding:utf-8\r\nimport requests\r\n\r\nrequest = requests.post('http://127.0.0.1:8050/execute', data={\r\n    'har':1,\r\n    'html':1,\r\n    'http_method':'GET',\r\n    'images':1,\r\n    'lua_source':'''\r\n    function main(splash)\r\n        local url = splash.args.url\r\n        assert(splash:go(url))\r\n        assert(splash:wait(0.5))\r\n        return {\r\n            html = splash:html(),\r\n            png = splash:png(),\r\n            har = splash:har(),\r\n        }\r\n    end\r\n    ''',\r\n    'png':1,\r\n    'render_all':False,\r\n    'resource_timeout':0,\r\n    'save_args':[],\r\n    'timeout':60,\r\n    'url':'http://mp.weixin.qq.com/s?timestamp=1467478406&src=3&ver=1&signature=Dws5bhm8YiaBsgaEHre7Cdg5sidfbbEnSdUaDkS1rq-4o3KbUiQt5yLxxU48*Aw2KzU2h8eTz-HK7m4*vlCAlhb*S3C3JNGh71Asu8Suvurmo5a*6JIDlu7JKBFfG88XD7ovwQNCyqQ0NNyRcdieOCmnLcsPxVOgfTMIM-5ITXw=',\r\n    'viewport':'1024x768',\r\n    'wait':0.5\r\n}, headers={'Content-Type':\"application/json\"})\r\n\r\nprint request.status_code\r\nprint request.text`\r\n\r\nerror msg:\r\n\r\n400\r\n{\"description\": \"Incorrect HTTP API arguments\", \"type\": \"BadOption\", \"info\": {\"description\": \"Can't decode JSON\", \"message\": \"Expecting value: line 1 column 1 (char 0)\", \"type\": \"invalid_json\"}, \"error\": 400}\r\n"},"comment":{"url":"https://api.github.com/repos/scrapinghub/splash/issues/comments/230427935","html_url":"https://github.com/scrapinghub/splash/issues/477#issuecomment-230427935","issue_url":"https://api.github.com/repos/scrapinghub/splash/issues/477","id":230427935,"user":{"login":"gamelife1314","id":10297148,"avatar_url":"https://avatars.githubusercontent.com/u/10297148?v=3","gravatar_id":"","url":"https://api.github.com/users/gamelife1314","html_url":"https://github.com/gamelife1314","followers_url":"https://api.github.com/users/gamelife1314/followers","following_url":"https://api.github.com/users/gamelife1314/following{/other_user}","gists_url":"https://api.github.com/users/gamelife1314/gists{/gist_id}","starred_url":"https://api.github.com/users/gamelife1314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gamelife1314/subscriptions","organizations_url":"https://api.github.com/users/gamelife1314/orgs","repos_url":"https://api.github.com/users/gamelife1314/repos","events_url":"https://api.github.com/users/gamelife1314/events{/privacy}","received_events_url":"https://api.github.com/users/gamelife1314/received_events","type":"User","site_admin":false},"created_at":"2016-07-05T09:17:20Z","updated_at":"2016-07-05T09:17:20Z","body":"@lopuhin thank you"}}
{"actor":{"display_login":"gamelife1314"}}