{"action":"closed","issue":{"url":"https://api.github.com/repos/golang/go/issues/23100","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/23100/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/23100/comments","events_url":"https://api.github.com/repos/golang/go/issues/23100/events","html_url":"https://github.com/golang/go/issues/23100","id":281277934,"number":23100,"title":"proposal: net/http: allow setting timeouts individually in Client","user":{"login":"alex-leonhardt","id":4490686,"avatar_url":"https://avatars3.githubusercontent.com/u/4490686?v=4","gravatar_id":"","url":"https://api.github.com/users/alex-leonhardt","html_url":"https://github.com/alex-leonhardt","followers_url":"https://api.github.com/users/alex-leonhardt/followers","following_url":"https://api.github.com/users/alex-leonhardt/following{/other_user}","gists_url":"https://api.github.com/users/alex-leonhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/alex-leonhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex-leonhardt/subscriptions","organizations_url":"https://api.github.com/users/alex-leonhardt/orgs","repos_url":"https://api.github.com/users/alex-leonhardt/repos","events_url":"https://api.github.com/users/alex-leonhardt/events{/privacy}","received_events_url":"https://api.github.com/users/alex-leonhardt/received_events","type":"User","site_admin":false},"labels":[{"id":373401956,"url":"https://api.github.com/repos/golang/go/labels/NeedsDecision","name":"NeedsDecision","color":"ededed","default":false},{"id":236419512,"url":"https://api.github.com/repos/golang/go/labels/Proposal","name":"Proposal","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/30","html_url":"https://github.com/golang/go/milestone/30","labels_url":"https://api.github.com/repos/golang/go/milestones/30/labels","id":1373555,"number":30,"title":"Proposal","description":"Proposals that are pending (not yet accepted/rejected).\r\n","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars1.githubusercontent.com/u/104030?v=4","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":220,"closed_issues":356,"state":"open","created_at":"2015-10-24T01:40:49Z","updated_at":"2018-02-07T17:21:26Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2017-12-12T06:59:59Z","updated_at":"2018-02-07T17:21:26Z","closed_at":"2018-02-07T17:21:26Z","author_association":"NONE","body":"### What version of Go are you using (`go version`)?\r\n```go1.9 darwin/amd64```\r\n\r\n### Does this issue reproduce with the latest release?\r\n```yes```\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\n```\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"darwin\"\r\nGOOS=\"darwin\"\r\nGOPATH=\"/Users/ale/projects/go\"\r\nGORACE=\"\"\r\nGOROOT=\"/usr/local/go\"\r\nGOTOOLDIR=\"/usr/local/go/pkg/tool/darwin_amd64\"\r\nGCCGO=\"gccgo\"\r\nCC=\"clang\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/c6/5xqsbcl95j713z7y5tz1cp6m0000gn/T/go-build047959207=/tmp/go-build -gno-record-gcc-switches -fno-common\"\r\nCXX=\"clang++\"\r\nCGO_ENABLED=\"1\"\r\nCGO_CFLAGS=\"-g -O2\"\r\nCGO_CPPFLAGS=\"\"\r\nCGO_CXXFLAGS=\"-g -O2\"\r\nCGO_FFLAGS=\"-g -O2\"\r\nCGO_LDFLAGS=\"-g -O2\"\r\nPKG_CONFIG=\"pkg-config\"\r\n```\r\n\r\n### What did you do?\r\nIt's not a bug; more a feature request. When calling a HTTP endpoint using http.Client; it'd be great if it was possible to individually configure the `connection timeout` from the `response timeout` and a generic `timeout` that would count for both. Reason I'm asking for this is to be able to fail fast when a endpoint just isn't there, vs wait for potentially longer when there is a endpoint and it's slow to respond. I've found some implementation of this, but it is much more \"work\" than it really should be. \r\n\r\nhttps://stackoverflow.com/questions/16895294/how-to-set-timeout-for-http-get-requests-in-golang\r\n\r\nCloudflare's blog is pretty good, and much more concise, however, still more than I would have expected : https://blog.cloudflare.com/the-complete-guide-to-golang-net-http-timeouts/\r\n\r\n### What did you expect to see?\r\n\r\n```\r\nhttp.Client{\r\n  ConnectionTimeout: time.Duration,\r\n  ResponseTimeout: time.Duration\r\n}\r\n```\r\n\r\n### What did you see instead?\r\n\r\n```\r\nhttp.Client{\r\n  Timeout: time.Duration\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"bradfitz"}}