{"action":"created","issue":{"url":"https://api.github.com/repos/carllerche/http/issues/83","repository_url":"https://api.github.com/repos/carllerche/http","labels_url":"https://api.github.com/repos/carllerche/http/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/carllerche/http/issues/83/comments","events_url":"https://api.github.com/repos/carllerche/http/issues/83/events","html_url":"https://github.com/carllerche/http/issues/83","id":247123359,"number":83,"title":"Make HTTP version optional","user":{"login":"pyfisch","id":2781017,"avatar_url":"https://avatars0.githubusercontent.com/u/2781017?v=4","gravatar_id":"","url":"https://api.github.com/users/pyfisch","html_url":"https://github.com/pyfisch","followers_url":"https://api.github.com/users/pyfisch/followers","following_url":"https://api.github.com/users/pyfisch/following{/other_user}","gists_url":"https://api.github.com/users/pyfisch/gists{/gist_id}","starred_url":"https://api.github.com/users/pyfisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyfisch/subscriptions","organizations_url":"https://api.github.com/users/pyfisch/orgs","repos_url":"https://api.github.com/users/pyfisch/repos","events_url":"https://api.github.com/users/pyfisch/events{/privacy}","received_events_url":"https://api.github.com/users/pyfisch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-08-01T16:13:28Z","updated_at":"2017-08-05T18:31:53Z","closed_at":null,"body":"In many cases it is not necessary to specify the HTTP version to be used instead it can be chosen by the underlying HTTP implementation.\r\n\r\nA hypothetical requests-like client may allow sending requests like this:\r\n\r\n```rust\r\nlet request = Request::builder().uri(\"https://www.google.com/about/\").body(())?;\r\nlet response = requests::fetch(request)?;\r\n```\r\n\r\nCurrently the request will be for `HTTP_11` but a crate user probably means \"use whatever HTTP version you think works best\" and in this case would probably prefer if the http client used e.g. HTTP/2, QUIC. But in some other cases users will explicitly set the version to `HTTP_11` because they want to test the page or just don't like the overhead of HTTP/2 for a single connection so ignoring the field for sending requests is not an option either.\r\n\r\nI think the version field should be optional: either `Option<Version>` or it could be an extension using the extension mechanism (still part of this crate of course).\r\n"},"comment":{"url":"https://api.github.com/repos/carllerche/http/issues/comments/320462413","html_url":"https://github.com/carllerche/http/issues/83#issuecomment-320462413","issue_url":"https://api.github.com/repos/carllerche/http/issues/83","id":320462413,"user":{"login":"pyfisch","id":2781017,"avatar_url":"https://avatars0.githubusercontent.com/u/2781017?v=4","gravatar_id":"","url":"https://api.github.com/users/pyfisch","html_url":"https://github.com/pyfisch","followers_url":"https://api.github.com/users/pyfisch/followers","following_url":"https://api.github.com/users/pyfisch/following{/other_user}","gists_url":"https://api.github.com/users/pyfisch/gists{/gist_id}","starred_url":"https://api.github.com/users/pyfisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyfisch/subscriptions","organizations_url":"https://api.github.com/users/pyfisch/orgs","repos_url":"https://api.github.com/users/pyfisch/repos","events_url":"https://api.github.com/users/pyfisch/events{/privacy}","received_events_url":"https://api.github.com/users/pyfisch/received_events","type":"User","site_admin":false},"created_at":"2017-08-05T18:31:53Z","updated_at":"2017-08-05T18:31:53Z","body":"You mean, the HTTP client should ignore the version field and use the \"best\" version? For example if the client learns that example.org supports HTTP/2 it would send every request with HTTP/2? To do something different an unspecified client-specific API needs to be used?"}}
{"actor":{"display_login":"pyfisch"}}