Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for RegisterProtocol (0.13 sec)

  1. src/net/http/transport_test.go

    // Test that we use the older backward compatible cancellation protocol
    // when a RoundTripper is registered via RegisterProtocol.
    func TestAltProtoCancellation(t *testing.T) {
    	defer afterTest(t)
    	tr := &Transport{}
    	c := &Client{
    		Transport: tr,
    		Timeout:   time.Millisecond,
    	}
    	tr.RegisterProtocol("cancel", cancelProto{})
    	_, err := c.Get("cancel://bar.com/path")
    	if err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
Back to top