Adds new routes to the application, one for each possible http verb (GET,
 POST, DELETE and PUT).
438904
def add_route_for_all_verbs(path, controller)
      add_route('GET', path, controller)
      add_route('POST', path, controller)
      add_route('DELETE', path, controller)
      add_route('PUT', path, controller)
    end
195297
def add_route(config, name, pattern, *args, **kwargs):
    
    config.add_route(name, pattern, *args, **kwargs)
    GENERATE_ETAG_ROUTE_NAMES.add(name)
310467
public function appendRoute()
    {
        if (!$this->confirm('Do you want to append new route?')) {
            return;
        }

        $contents = $this->laravel['files']->get($path = app_path('Http/routes.php'));
        $contents .= PHP_EOL."Route::group(['middleware' => ['web']], function () {";
        $contents .= PHP_EOL."\tRoute::resource('{$this->getRouteName()}', '{$this->getControllerName()}');";
        $contents .= PHP_EOL."});";

        $this->laravel['files']->put($path, $contents);

        $this->console->info('Route appended successfully.');
    }
388096
def _addMethod(self, effect, verb, resource, conditions):
        """"""
        if verb != "*" and not hasattr(HttpVerb, verb):
            raise NameError("Invalid HTTP verb " + verb + ". Allowed verbs in HttpVerb class")
        resourcePattern = re.compile(self.pathRegex)
        if not resourcePattern.match(resource):
            raise NameError("Invalid resource path: " + resource + ". Path should match " + self.pathRegex)

        if resource[:1] == "/":
            resource = resource[1:]

        resourceArn = ("arn:aws:execute-api:" +
            self.region + ":" +
            self.awsAccountId + ":" +
            self.restApiId + "/" +
            self.stage + "/" +
            verb + "/" +
            resource)

        if effect.lower() == "allow":
            self.allowMethods.append({
                'resourceArn' : resourceArn,
                'conditions' : conditions
            })
        elif effect.lower() == "deny":
            self.denyMethods.append({
                'resourceArn' : resourceArn,
                'conditions' : conditions
            })
1091032
protected function addMiddleware()
    {
        // the method name was changed in Laravel 5.4
        if (method_exists(\Illuminate\Routing\Router::class, 'aliasMiddleware')) {
            Route::aliasMiddleware('df.auth_check', AuthCheck::class);
            Route::aliasMiddleware('df.access_check', AccessCheck::class);
            Route::aliasMiddleware('df.verb_override', VerbOverrides::class);
        } else {
            /** @noinspection PhpUndefinedMethodInspection */
            Route::middleware('df.auth_check', AuthCheck::class);
            /** @noinspection PhpUndefinedMethodInspection */
            Route::middleware('df.access_check', AccessCheck::class);
            /** @noinspection PhpUndefinedMethodInspection */
            Route::middleware('df.verb_override', VerbOverrides::class);
        }

        /** Add the first user check to the web group */
        Route::prependMiddlewareToGroup('web', FirstUserCheck::class);

        Route::middlewareGroup('df.api', [
            'df.verb_override',
            'df.auth_check',
            'df.access_check'
        ]);
    }
987379
function AddRoutes (routes, kind) {

		function AddRoute (route, name, kind) {
			let root 	= '/'+name.toLowerCase(),
				router 	= Express.Router({ mergeParams: true }),
				hroute 	= Express.Router({ mergeParams: true }),
				lstore  = Session.Stores.Limits,
				point 	= null, limiters = { 
					root: Session.Limiter(router, lstore), 
					help: Session.Limiter(hroute, lstore)
				}, 	hlimit;

			// Instantiate Route
				REST[kind](name, route);
				point = REST.Points[name];

			// Handle Validation
				if ('Validate' in REST.Points[name])
					Valid = REST.Points[name].Validate;	
				hlimit  = ReqHandle.Limit('help',limiters.help,point,'/',`${root}/`);

			// Handle Documentation (root); if applicable
				if (!Object.keys(route.Actions).has('/')) PushRoute(
					hroute, 'all', '/', ReqHandle.Errs(point, '/'), 
					hlimit, ReqHandle.Valid(true)
				);

			// Handle Errors
				Imm.Map(route.Errors).map((paths, which) => {
					paths.map((scheme, i) => { PushRoute(
						router, 'all', scheme, ReqHandle.Errs(point, MSG[which]), 
						ReqHandle.Limit('erro',limiters.root,point,'/',`${root}${scheme}/`.replace(/[/]+$/,'/'))
					);	});
				});

			// Handle Points
				Imm.OrderedMap(route.Actions).map((act, pth) => {
					try {
						let allowd = act.Doc.Methods,
							denied = HTTPREQ.filter((v,i)=>allowd.indexOf(v)<0),
							isMdle = allowd.has('MIDDLEWARE');
						// Omit Middleware
							let scheme 	= ReqPattern(pth, act),
								key 	= ReqPattern(pth, act, true),
								dir 	= `${root}${ReqPattern(pth, act, true)}`,
								lmt 	= ReqHandle.Limit('endp',limiters.root, point, pth, dir),
								vld 	= !isMdle ? ReqHandle.Valid(act.Doc.Headers) : null;

							// Handle Douchebag Requests
								!isMdle && denied.map(M => {
									let func = M.toLowerCase(), err = MSG['NO_'+M];
									PushRoute(router, func, scheme, ReqHandle.Errs(point, err), lmt, vld);
								});
							// Handle Good-Guy Requests
								allowd.map(M => {
									let func = 	M.toLowerCase(),
										main = 	ReqHandle.Main(point, pth),
										upld =	ReqHandle.Upload(M,act.Doc.Files),
										schm = 	new RegExp([
													name.toLowerCase(),
													scheme.slice(1,-1)
														.replace(/\/{2,}/g,'')
														.replace(/([^\\])\//g,'$1\\/')
														.replace(/(^|[\/(]|[|]):\w+(?=[(])/g,'$1')
														.replace(/^(.+)$/,'(?:$1)')
												].join('\\/'));
									// ----
									SockRoute(name, pth, key, lmt, vld, upld, schm); 	// Socket
									!isMdle && PushRoute(
										router, func, scheme, main, lmt, vld, upld		// HTTP
									);
								});
							// Handle Documentation (sub)
								!isMdle && PushRoute(
									hroute, 'all', key, ReqHandle.Errs(point, pth), hlimit, vld
								);
					} catch(e) {
						console.log(act)
						throw e;
					}
				});

			// Mount Router
				API.use(root, router); // Requests Path
				HLP.use(root, hroute); // Document Path

			// Return to Initialize
				return point;
		}

		// Create each Point
		if (!!routes) 
			Imm .OrderedMap(routes)
				.filter((v,k)=>k!="__DEFAULTS")
				.map((route, name)=>AddRoute(route, name, kind))
				.map(route=>route.Init());
	}
131203
def _add_url_route(self, endpoint, rule, view_func, method):
        
        if self.api_prefix:
            rule = self.api_prefix + rule

        if self.endpoint_prefix:
            endpoint = self.endpoint_prefix + endpoint

        self.app.add_url_rule(
            rule,
            endpoint,
            self._apply_auth(view_func),
            methods=[method]
        )
477680
public function addRoute($method, $uri, callable $handler, $hooks=[])
    {
        $this->routes[] = [$method, $uri, $handler, $hooks];
    }
41132
def register_method(self, method, fn):
        

        # ensure the HTTP verb is not already registered
        if method not in self.methods.keys():
            logger.debug('Service Router ({0} - {1}): Adding method {2} on '
                         'route {3}'
                         .format(id(self),
                                 self.service_name,
                                 method,
                                 self.uri))
            self.methods[method] = fn

        else:
            raise RouteAlreadyRegisteredError(
                'Service Router ({0} - {1}): Method {2} already registered '
                'on Route {3}'
                .format(id(self),
                        self.service_name,
                        method,
                        self.uri))
554075
function addStaticRoute(routePath, targets) {
		if (!Object.isArray(targets)) {
			targets = [targets];
		}
		targets.forEach(function(target) {
			if (target)
				app.use(routePath, app.middleware.static(path.resolve(config.rootDir, target)));
		});
	}
721219
def add_put(self, *args, **kwargs):
        
        return self.add_route(hdrs.METH_PUT, *args, **kwargs)
209327
public function put()
    {
        $args = func_get_args();

        return $this->mapRoute($args)->via(\Yee\Http\Request::METHOD_PUT);
    }
1159547
public function add($name, $pattern, $responds_to = array("GET", "POST", "PUT", "DELETE"))
	{
		$route = new Route($this->sub_directory.$pattern, $responds_to);
		$this->routes[$name] = $route;
		return $route;
	}
631761
def register_route(http_method, path, callback, options)
      route = new_route(http_method, path, callback, options)
      route.to(HTTPCallback.new(handler_class, callback))
      handler_class.http_routes << route
    end
1337572
def add_handlers(self, room_handler=None, transaction_handler=None,
                     user_handler=None):
        """"""
        # Add all the normal matrix API routes
        if room_handler:
            room = resources.Room(room_handler,
                                  self.Api)
            self.add_route("/rooms/{room_alias}", room)
        if transaction_handler:
            transaction = resources.Transaction(transaction_handler,
                                                self.Api)
            self.add_route("/transactions/{txn_id}", transaction)
        if user_handler:
            user = resources.User(user_handler,
                                  self.Api)
            self.add_route("/users/{user_id}", user)
1348766
def put(query_url,
            headers: {},
            parameters: {})
      HttpRequest.new(HttpMethodEnum::PUT,
                      query_url,
                      headers: headers,
                      parameters: parameters)
    end
627153
def add_options(self, path: str, handler: _WebHandler,
                    **kwargs: Any) -> AbstractRoute:
        
        return self.add_route(hdrs.METH_OPTIONS, path, handler, **kwargs)