net/http/httptest: add Client and Certificate methods to Server
Adds a function for easily accessing the x509.Certificate of a Server, if there is one. Also adds a helper function for getting a http.Client suitable for use with the server. This makes the steps required to test a httptest TLS server simpler. Fixes #18411 Change-Id: I2e78fe1e54e31bed9c641be2d9a099f698c7bbde Reviewed-on: https://go-review.googlesource.com/34639Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please register or sign in to comment