tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
				tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
			},
		}
		client := getHTTPClientWithConfig(tlsConfig)
		_, err := client.Get(targetURL + "/example")
		Expect(err).ToNot(HaveOccurred())
	})

	It("logs the request", func() {
		handler := func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(200) }
		dispatcher.AddRoute("/example", handler)
		client := getHTTPClient()
		_, err := client.Get(targetURL + "/example")
		Expect(err).ToNot(HaveOccurred())
		Expect(logger.InfoCallCount()).To(Equal(1))
		tag, message, _ := logger.InfoArgsForCall(0)
		Expect(message).To(Equal("GET /example"))
		Expect(tag).To(Equal("HTTPS Dispatcher"))
	})

	Context("When the basic authorization is wrong", func() {
		It("returns 401", func() {
			dispatcher.AddRoute("/example", func(w http.ResponseWriter, r *http.Request) {
				w.WriteHeader(500)
			})
			client := getHTTPClient()

			response, err := client.Get("https://*****:*****@127.0.0.1:7789/example")

			Expect(err).ToNot(HaveOccurred())