Cookies management by TermsFeed Cookie Consent

http

Learn how to write HTTP clients and servers in Go the smart way with the examples

๐Ÿงช Write end-to-end tests in Go using httptest.Server

shorts httptest http testing

โฑ๏ธ Set HTTP client timeout in Go

Learn how to set a time limit for the execution of an HTTP request
http

โฐ Handle HTTP timeout error in Go

shorts http

๐Ÿœ Print HTTP request/response for debugging in Go

Learn how to pretty print HTTP request and response
http

๐Ÿ“” Convert a struct to io.Reader in Go

Learn how to convert a struct to io.Reader and send it as an HTTP POST request body
introduction http

๐Ÿ“Ÿ Convert HTTP response io.ReadCloser to string in Go

Learn how to convert a HTTP client response body to string
introduction http

๐Ÿ”Œ Handle 'connection reset by peer' error in Go

Learn what it means and how to detect the ‘connection reset by peer’ error
http errors

๐Ÿช  Handle 'broken pipe' error in Go

Learn how to detect the ‘broken pipe’ error when writing an HTTP response
http errors

๐Ÿ“ก Handle Context Deadline Exceeded error in Go

Learn how to check if a HTTP client returns a request timeout error
http errors