Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for interceptRequest (0.36 sec)

  1. src/cmd/go/internal/web/http.go

    	// Go's http.DefaultClient allows 10 redirects before returning an error.
    	// Mimic that behavior here.
    	if len(via) >= 10 {
    		return errors.New("stopped after 10 redirects")
    	}
    
    	interceptRequest(req)
    	return nil
    }
    
    type Interceptor struct {
    	Scheme   string
    	FromHost string
    	ToHost   string
    	Client   *http.Client
    }
    
    func EnableTestHooks(interceptors []Interceptor) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 10 17:34:27 UTC 2023
    - 9.7K bytes
    - Viewed (0)
Back to top