HTTP GET routing.

@param uriTemplate the specified request URI template
@param handler     the specified handler
@return router
559550
public static Router get(final String uriTemplate, final ContextHandler handler) {
        return route().get(uriTemplate, handler);
    }
917379
public function get(
        string $definition,
        RequestHandlerInterface $handler,
        ?string $name = null,
        $data = null
    ): Route {
        return $this->route(Method::GET, $definition, $handler, $name, $data);
    }
688764
def _get(self, url, method, host):
        
        url = unquote(host + url)
        # Check against known static routes
        route = self.routes_static.get(url)
        method_not_supported = MethodNotSupported(
            "Method {} not allowed for URL {}".format(method, url),
            method=method,
            allowed_methods=self.get_supported_methods(url),
        )
        if route:
            if route.methods and method not in route.methods:
                raise method_not_supported
            match = route.pattern.match(url)
        else:
            route_found = False
            # Move on to testing all regex routes
            for route in self.routes_dynamic[url_hash(url)]:
                match = route.pattern.match(url)
                route_found |= match is not None
                # Do early method checking
                if match and method in route.methods:
                    break
            else:
                # Lastly, check against all regex routes that cannot be hashed
                for route in self.routes_always_check:
                    match = route.pattern.match(url)
                    route_found |= match is not None
                    # Do early method checking
                    if match and method in route.methods:
                        break
                else:
                    # Route was found but the methods didn't match
                    if route_found:
                        raise method_not_supported
                    raise NotFound("Requested URL {} not found".format(url))

        kwargs = {
            p.name: p.cast(value)
            for value, p in zip(match.groups(1), route.parameters)
        }
        route_handler = route.handler
        if hasattr(route_handler, "handlers"):
            route_handler = route_handler.handlers[method]
        return route_handler, [], kwargs, route.uri
236981
public Router all(@NotNull final Pattern regex, @NotNull final Middleware... handler) {
        get(regex, handler);
        put(regex, handler);
        post(regex, handler);
        delete(regex, handler);
        options(regex, handler);
        head(regex, handler);
        trace(regex, handler);
        connect(regex, handler);
        patch(regex, handler);
        return this;
    }
1263920
def route(method, pattern, handler=None):
    
    if handler is None:
        return partial(route, method, pattern)
    return routes.append(method, pattern, handler)
491970
public function addGet(string $uri, string $handler, string $name = null)
    {
        $this->addRoute("GET", $uri, $handler, $name);
    }
894265
public URLStreamHandler createURLStreamHandler (String protocol)
    {
        Class<? extends URLStreamHandler> handler = _handlers.get(protocol.toLowerCase());
        if (handler != null) {
            try {
                return handler.newInstance();
            } catch (Exception e) {
                log.warning("Unable to instantiate URLStreamHandler", "protocol", protocol,
                            "cause", e);
            }
        }
        return null;
    }
708815
@Deprecated
    public Blade get(@NonNull String path, @NonNull RouteHandler0 handler) {
        this.routeMatcher.addRoute(path, handler, HttpMethod.GET);
        return this;
    }
301169
function createHandler(to, except, pathFunc, protocol) {
    return function(req, res, next) {
        var host = req.hostname || '';
        var url = req.url;

        if (host in except) {
            next();
        } else {
            var target = new URIjs(pathFunc(host, url))
              .host(to)
              .protocol(protocol || '')
              .href();

            res.redirect(301, target);
        }
    };
}
524504
public Blade delete(@NonNull String path, @NonNull RouteHandler handler) {
        this.routeMatcher.addRoute(path, handler, HttpMethod.DELETE);
        return this;
    }
228645
public RouteMatcher headWithRegEx(String regex, Handler<HttpServerRequest> handler) {
		addRegEx(regex, handler, headBindings);
		return this;
	}
693028
public static URL toUrlForHttp(String urlStr, URLStreamHandler handler) {
		Assert.notBlank(urlStr, "Url is blank !");
		// 去掉url中的空白符，防止空白符导致的异常
		urlStr = StrUtil.cleanBlank(urlStr);
		return URLUtil.url(urlStr, handler);
	}
74808
def route(self, uri, methods=frozenset({'GET'}), host=None,
              strict_slashes=False, stream=False, websocket=False):
        '''
        '''

        # Fix case where the user did not prefix the URL with a /
        # and will probably get confused as to why it's not working
        if not uri.startswith('/'):
            uri = '/' + uri

        def response(handler):
            if websocket:
                handler.is_websocket = True
            elif stream:
                handler.is_stream = True
            self.router.add(uri=uri, methods=methods, handler=handler,
                            host=host, strict_slashes=strict_slashes)
            return handler

        return response
339372
public Blade get(@NonNull String path, @NonNull RouteHandler handler) {
        this.routeMatcher.addRoute(path, handler, HttpMethod.GET);
        return this;
    }
1080129
public RouteMatcher postWithRegEx(String regex, Handler<HttpServerRequest> handler) {
		addRegEx(regex, handler, postBindings);
		return this;
	}
413982
public Router get(@NotNull final String pattern, @NotNull final IMiddleware... handlers) {
        addPattern("GET", pattern, handlers, getBindings);
        return this;
    }
588876
public function get($uri, $handler, $middlewares = array())
    {
        return $this->add($this->route('GET', $uri, $handler, $middlewares));
    }