Esempio n. 1
0
func NewHttpEndpoint(in *url.URL) (*HttpEndpoint, error) {
	if in == nil {
		return nil, fmt.Errorf("Provide url")
	}
	return &HttpEndpoint{
		url: netutils.CopyUrl(in),
		id:  fmt.Sprintf("%s://%s", in.Scheme, in.Host)}, nil
}
Esempio n. 2
0
func (f *RedirectFallback) ProcessRequest(r request.Request) (*http.Response, error) {
	return nil, &errors.RedirectError{URL: netutils.CopyUrl(f.u)}
}