Skip to content

net/http: easier way to check whether an error is due to timeout #6185

Closed
@gpaul

Description

@gpaul
Currently the only way to check whether a Get/Post/Do failed due to the respond headers
taking too long is to check the error string for the proper contents.

It would help if http.responseAndError satisfied the net.Error interface so one could
check for err.Timeout() if you'd like to treat timeouts differently.

go version: 1.1.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions