{"action":"created","issue":{"url":"https://api.github.com/repos/wiremod/wire/issues/1040","labels_url":"https://api.github.com/repos/wiremod/wire/issues/1040/labels{/name}","comments_url":"https://api.github.com/repos/wiremod/wire/issues/1040/comments","events_url":"https://api.github.com/repos/wiremod/wire/issues/1040/events","html_url":"https://github.com/wiremod/wire/pull/1040","id":119867256,"number":1040,"title":"Handle HTTP (optionally, but by default) clientside","user":{"login":"SwadicalRag","id":10724598,"avatar_url":"https://avatars.githubusercontent.com/u/10724598?v=3","gravatar_id":"","url":"https://api.github.com/users/SwadicalRag","html_url":"https://github.com/SwadicalRag","followers_url":"https://api.github.com/users/SwadicalRag/followers","following_url":"https://api.github.com/users/SwadicalRag/following{/other_user}","gists_url":"https://api.github.com/users/SwadicalRag/gists{/gist_id}","starred_url":"https://api.github.com/users/SwadicalRag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SwadicalRag/subscriptions","organizations_url":"https://api.github.com/users/SwadicalRag/orgs","repos_url":"https://api.github.com/users/SwadicalRag/repos","events_url":"https://api.github.com/users/SwadicalRag/events{/privacy}","received_events_url":"https://api.github.com/users/SwadicalRag/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":31,"created_at":"2015-12-02T04:50:12Z","updated_at":"2015-12-04T10:39:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wiremod/wire/pulls/1040","html_url":"https://github.com/wiremod/wire/pull/1040","diff_url":"https://github.com/wiremod/wire/pull/1040.diff","patch_url":"https://github.com/wiremod/wire/pull/1040.patch"},"body":"Addresses #1026\r\n\r\nThis is my first pull request to the wire repo, I apologise in advance if I didn't follow any specific procedure as to making a pull request correctly!\r\n\r\nThis PR adds in clientside HTTP handling: something that will hopefully get HTTP enabled by default again. This PR also adds in a convar `wire_expression2_http_client [= 1]`, which will allow server owners to easily enable or disable clientside HTTP request handling. Sending requests from the client to the server comes at a sharp price of latency, and allowing server owners to re-enable serverside requests to reduce latency whilst acknowledging the security concerns is important in my opinion.\r\n\r\nI will try my best to respond to any concerns of code quality. I don't usually contribute to public repositories because I find it difficult to write code in styles I am not comfortable with. Nonetheless, this is not my repo, and as such I will address any concerns that you have.\r\n\r\nI have commented on most of the code in this PR, which will hopefully make the code more maintainable and readable. Please do not hesitate to contact me if you feel that parts of the code are unreadable.\r\n\r\nI have prioritised compatibility: the HTTP library will work as it had always worked in E2 even when clientside requests are enabled or disabled.\r\n\r\n-- swadical"},"comment":{"url":"https://api.github.com/repos/wiremod/wire/issues/comments/161933739","html_url":"https://github.com/wiremod/wire/pull/1040#issuecomment-161933739","issue_url":"https://api.github.com/repos/wiremod/wire/issues/1040","id":161933739,"user":{"login":"Divran","id":1485728,"avatar_url":"https://avatars.githubusercontent.com/u/1485728?v=3","gravatar_id":"","url":"https://api.github.com/users/Divran","html_url":"https://github.com/Divran","followers_url":"https://api.github.com/users/Divran/followers","following_url":"https://api.github.com/users/Divran/following{/other_user}","gists_url":"https://api.github.com/users/Divran/gists{/gist_id}","starred_url":"https://api.github.com/users/Divran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Divran/subscriptions","organizations_url":"https://api.github.com/users/Divran/orgs","repos_url":"https://api.github.com/users/Divran/repos","events_url":"https://api.github.com/users/Divran/events{/privacy}","received_events_url":"https://api.github.com/users/Divran/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T10:39:45Z","updated_at":"2015-12-04T10:39:45Z","body":"Yeah the problem with two calls is if you've set http mode to \"auto\", so that it checks if serverside is available, else uses clientside, then having two calls would be more of a pain than one, but I dunno. @TomyLobo what do you think"}}