Skip to content

Glossary: Go in Practice

httptest.NewServer

Also written: srv.URL, srv.Client

Starts a real server on a free local port for tests. `srv.URL` is its address and `srv.Client()` a client set up for it.

Where the book teaches it

Related terms

Handler