func legacyGetInteractionMethods(ctx context.Context, logger bakery.Logger, client httprequest.Doer, u *url.URL) map[string]*url.URL {
	methodURLs, err := legacyGetInteractionMethods1(ctx, client, u)
	if err != nil {
		// When a discharger doesn't support retrieving interaction methods,
		// we expect to get an error, because it's probably returning an HTML
		// page not JSON.
		if logger != nil {
			logger.Debugf(ctx, "ignoring error: cannot get interaction methods: %v; %s", err, errgo.Details(err))
		}
		methodURLs = make(map[string]*url.URL)
	}
	if methodURLs["interactive"] == nil {
		// There's no "interactive" method returned, but we know
		// the server does actually support it, because all dischargers
		// are required to, so fill it in with the original URL.
		methodURLs["interactive"] = u
	}
	return methodURLs
}
// legacyGetInteractionMethods queries a URL as found in an
// ErrInteractionRequired VisitURL field to find available interaction
// methods.
//
// It does this by sending a GET request to the URL with the Accept
// header set to "application/json" and parsing the resulting
// response as a map[string]string.
//
// It uses the given Doer to execute the HTTP GET request.
legacyGetInteractionMethods queries a URL as found in an
ErrInteractionRequired VisitURL field to find available interaction
methods.

It does this by sending a GET request to the URL with the Accept
header set to "application/json" and parsing the resulting
response as a map[string]string.

It uses the given Doer to execute the HTTP GET request.
// legacyGetInteractionMethods queries a URL as found in an // ErrInteractionRequired VisitURL field to find available interaction // methods . // // It does this by sending a GET request to the URL with the Accept // header set to " application / json " and parsing the resulting // response as a map [ string ] string . // // It uses the given Doer to execute the HTTP GET request .
func legacyGetInteractionMethods(ctx context.Context, logger bakery.Logger, client httprequest.Doer, u *url.URL) map[string]*url.URL {
	methodURLs, err := legacyGetInteractionMethods1(ctx, client, u)
	if err != nil {
		if logger != nil {
			logger.Debugf(ctx, "ignoring error: cannot get interaction methods: %v; %s", err, errgo.Details(err))
		}
		methodURLs = make(map[string]*url.URL)
	}
	if methodURLs["interactive"] == nil {
		methodURLs["interactive"] = u
	}
	return methodURLs
}
func legacyGetInteractionMethods ( ctx context . Context , logger bakery . Logger , client httprequest . Doer , u * url . URL ) map [ string ] * url . URL { methodURLs , err := legacyGetInteractionMethods1 ( ctx , client , u ) if err != nil { if logger != nil { logger . Debugf ( ctx , " " , err , errgo . Details ( err ) ) } methodURLs = make ( map [ string ] * url . URL ) } if methodURLs [ " " ] == nil { methodURLs [ " " ] = u } return methodURLs }
legacyGetInteractionMethods queries a URL as found in an
ErrInteractionRequired VisitURL field to find available interaction
methods.
legacyGetInteractionMethods queries a URL as found in an ErrInteractionRequired VisitURL field to find available interaction methods .
// When a discharger doesn't support retrieving interaction methods, // we expect to get an error, because it's probably returning an HTML // page not JSON. // There's no "interactive" method returned, but we know // the server does actually support it, because all dischargers // are required to, so fill it in with the original URL.