Shortcut for add_route with method PUT
354854
def add_put(self, path: str, handler: _WebHandler,
                **kwargs: Any) -> AbstractRoute:
        
        return self.add_route(hdrs.METH_PUT, path, handler, **kwargs)
217193
def put(self, uri_relative, request_bytes, custom_headers):
        

        return self._request(
            self._METHOD_PUT,
            uri_relative,
            request_bytes,
            {},
            custom_headers
        )
731653
def put(cls, id, api_key=None, **kwargs):
        """"""
        inst = cls(api_key=api_key)
        endpoint = '/'.join((cls.get_endpoint(), id))
        return inst.request('PUT', endpoint=endpoint, query_params=kwargs)
918858
def add_path(prev: Optional[ResponsePath], key: Union[str, int]) -> ResponsePath:
    
    return ResponsePath(prev, key)
1149864
def add_route(self, template, controller, **kwargs):
        
        if isinstance(controller, basestring):
            controller = pymagic.import_name(controller)

        self.routes.append((self.parse_route(template), controller, kwargs))

        return self
32071
def _push(self, title, view, class_name, is_class, **kwargs):
        

        # Set the page title
        set_view_attr(view, "title", title, cls_name=class_name)

        module_name = view.__module__
        method_name = view.__name__

        _endpoint = build_endpoint_route_name(view, "index" if is_class else method_name, class_name)
        endpoint = kwargs.pop("endpoint", _endpoint)
        kwargs.setdefault("endpoint_kwargs", {})
        order = kwargs.pop("order", 0)

        # Tags
        _nav_tags = get_view_attr(view, "nav_tags", ["default"], cls_name=class_name)
        tags = kwargs.pop("tags", _nav_tags)
        if not isinstance(tags, list):
            _ = tags
            tags = [_]
        kwargs["tags"] = tags

        # visible: accepts a bool or list of callback to execute
        visible = kwargs.pop("visible", [True])
        if not isinstance(visible, list):
            visible = [visible]

        if get_view_attr(view, "nav_visible", cls_name=class_name) is False:
            visible = False

        kwargs["view"] = view
        kwargs["visible"] = visible
        kwargs["active"] = False
        kwargs["key"] = class_name

        if is_class:  # class menu
            kwargs["endpoint"] = endpoint
            kwargs["has_subnav"] = True
        else:
            kwargs["has_subnav"] = False
            kwargs.update({
                "order": order,
                "has_subnav": False,
                "title": title,
                "endpoint": endpoint,
            })

        self._title_map[endpoint] = title

        path = "%s.%s" % (module_name, method_name if is_class else class_name)
        attach_to = kwargs.pop("attach_to", [])
        if not attach_to:
            attach_to.append(path)

        for path in attach_to:
            if path not in self.MENU:
                self.MENU[path] = {
                    "title": None,
                    "endpoint": None,
                    "endpoint_kwargs": {},
                    "order": None,
                    "subnav": [],
                    "kwargs": {}
                }

            if is_class:  # class menu
                self.MENU[path]["title"] = title
                self.MENU[path]["order"] = order
                self.MENU[path]["kwargs"] = kwargs

            else:  # sub menu
                self.MENU[path]["subnav"].append(kwargs)
756524
def p_route(self, p):
        """"""
        p[0] = AstRouteDef(self.path, p.lineno(1), p.lexpos(1), p[2], p[3], p[5], *p[4])
        if len(p) > 7:
            p[0].set_doc(p[8])
            if p[9]:
                keys = set()
                for attr in p[9]:
                    if attr.name in keys:
                        msg = "Attribute '%s' defined more than once." % attr.name
                        self.errors.append((msg, attr.lineno, attr.path))
                    keys.add(attr.name)
                p[0].set_attrs(p[9])
795706
def append(self, path, data, **kwargs):
        
        metadata_response = self._post(
            path, 'APPEND', expected_status=httplib.TEMPORARY_REDIRECT, **kwargs)
        data_response = self._requests_session.post(
            metadata_response.headers['location'], data=data, **self._requests_kwargs)
        _check_response(data_response)
        assert not data_response.content
438468
def add(app, url = None, path = None, endpoint=None, decorate=None, index='index.html', **options):
    """"""

    url = url or app.static_url_path or ''
    path = os.path.abspath(path or app.static_folder or '.')
    endpoint = endpoint or 'static_' + os.path.basename(path)
    decorate = decorate or (lambda f: f)
    endpoints = {}

    if path == app.static_folder:
        raise ValueError('Files in `{}` path are already automatically served on `{}` URL by Flask.'
            ' Set Flask app static_folder to None, if you want to serve them using Flask Ecstatic at `{}` URL'
            .format(path, app.static_url_path, url))

    @app.route(url + '/<path:filename>', endpoint = endpoint)
    @handle404
    @decorate
    def static_files(filename):
        if index:
            filename = safe_join(path, filename)
            if os.path.isdir(filename):
                filename = os.path.join(filename, index)
            return send_file(filename, **options)
        else:
            return send_from_directory(path, filename, **options)

    endpoints[endpoint] = static_files

    if index:
         @app.route(url + '/', endpoint = endpoint + '_index')
         @handle404
         @decorate
         def static_index():
             return send_from_directory(path, index, **options)

         endpoints[endpoint + '_index'] = static_index

         if url:
             @app.route(url, endpoint = endpoint + '_index_bare')
             @handle404
             @decorate
             def static_index_bare():
                 return send_from_directory(path, index, **options)

             endpoints[endpoint + '_index_bare'] = static_index_bare

    return endpoints
1119549
def add_route(app_or_blueprint, fn, context=default_context):
    
    transmute_func = TransmuteFunction(
        fn,
        args_not_from_request=["request"]
    )
    handler = create_handler(transmute_func, context=context)
    get_swagger_spec(app_or_blueprint).add_func(transmute_func, context)
    for p in transmute_func.paths:
        sanic_path = _convert_to_sanic_path(p)
        app_or_blueprint.add_route(handler, sanic_path, methods=list(transmute_func.methods))
411491
def add(self, method, path_settings, target):
        
        self.routes.append(Route(method, path_settings, target))
        return
1211414
function put($http_method = null, $ext = null) {
        static::$icons[$this->getAs()] = $this->getIcon();
        \Route::group([
            'middleware' => $this->getMiddleware(),
            'domain'     => $this->getDomain(),
            'prefix'     => $this->getPrefix(),
        ], function () use ($http_method, $ext) {
            $method = self::normalizeMethod($http_method);
            /** @var $route \Illuminate\Routing\Route */
            $route = \Route::$method($this->getUrl() . ($ext ? '.' . $ext : ''), [
                'as'   => $this->getAs(),
                'uses' => $this->getUses(),
            ]);
            if(count($this->getPatterns())) {
                $route->where($this->getPatterns());
            }
        });

        $this->action = null;
        $this->icon   = null;

        return $this;
    }
257385
def add3(self, target, path_settings=None, method='GET'):
        
        if path_settings is None:
            path_settings = []
        return self.add(method, path_settings, target)
1174719
def put(self, request, bot_id, id, format=None):
              
        return super(HandlerDetail, self).put(request, bot_id, id, format)
232630
def put(path, options = {}, headers = {}, raw = false)
      request(:put, path, options, headers, raw)
    end
949055
def insert_route(self, path, data, destroy_data_fn):
        
        return lib.ztrie_insert_route(self._as_parameter_, path, data, destroy_data_fn)
517493
protected final <REQ, RESP> Route put(RouteAction<Request<REQ>, Response<RESP>> action,
		RequestType<REQ> req, ResponseType<RESP> resp) {
		return createEntityRoute(HttpMethod.PUT, "", action, req, resp);
	}