// Put will add a route to the router that matches on PUT requests and the specified path.
359801
func (r *Router) Put(path string, fn interface{}) *Router {
	return r.addRoute(httpMethodPut, path, fn)
}
18215
func (e *Expect) PUT(path string, pathargs ...interface{}) *Request {
	return e.Request("PUT", path, pathargs...)
}
106417
func (g *Group) PUT(path string, handler HandlerFunc) {
	g.Handle("PUT", path, handler)
}
864384
func (app *App) PUT(route string, handler interface{}) *App {
	app.defaultRouter.Handle(MethodPUT, route, handler)
	return app
}
68437
func (s *orgController) Put() interface{} {
	var handler OrgPutHandler = func(params martini.Params, log *log.Logger, r render.Render, tokens oauth2.Tokens) {
		var (
			err             error
			payload         *PivotOrg
			responsePayload map[string]interface{}
			result          *PivotOrg
		)
		username := params[UserParam]
		org := NewOrg(username, log, tokens, s.store(), s.authClient)

		if result, err = org.Show(); err == pezdispenser.ErrNoMatchInStore {
			log.Println("Show yielded no results: ", err)
			payload, err = org.SafeCreate()
			responsePayload = structs.Map(payload)

		} else {
			log.Println("Show yielded a result: ", result, ":", err, "!=", pezdispenser.ErrNoMatchInStore)
			err = ErrCanNotCreateOrg
		}
		genericResponseFormatter(r, "", responsePayload, err)
	}
	return handler
}
1366741
func (m *methods) Put(path string, fn handler) *Route {
	return m.add(path, fn, PUT)
}
1078962
func (g *routeGroup) Put(path string, h http.HandlerFunc) {
	g.handle(http.MethodPut, path, h)
}
410168
func (f *FDBBackend) Put(ctx context.Context, entry *physical.Entry) error {
	defer metrics.MeasureSince([]string{"foundationdb", "put"}, time.Now())

	decoratedPath, err := decoratePath(entry.Key)
	if err != nil {
		return errwrap.Wrapf(fmt.Sprintf("could not build decorated path to put item %s: {{err}}", entry.Key), err)
	}

	_, err = f.db.Transact(func(tr fdb.Transaction) (interface{}, error) {
		err := f.internalPut(tr, decoratedPath, entry.Key, entry.Value)
		if err != nil {
			return nil, err
		}

		return nil, nil
	})

	if err != nil {
		return errwrap.Wrapf(fmt.Sprintf("put failed for item %s: {{err}}", entry.Key), err)
	}

	return nil
}
1189752
func (t *Tree) Add(method, path string, handler interface{}) (Route, error) {
	if path[0] != '/' {
		return nil, errors.New("path must start with '/'")
	}

	if path == "/" {
		return t.root.setHandler(method, handler)
	}

	n, err := t.root.add(path[1:])
	if err != nil {
		return nil, err
	}

	r, err := n.setHandler(method, handler)
	if err == nil {
		if l := len(n.params); l > t.maxParam {
			t.maxParam = l
		}
	}
	return r, err
}
926081
func (r *Router) Add(method, path string, h HandlerFunc) {
	// Validate path
	if path == "" {
		path = "/"
	}
	if path[0] != '/' {
		path = "/" + path
	}
	pnames := []string{} // Param names
	ppath := path        // Pristine path

	for i, l := 0, len(path); i < l; i++ {
		if path[i] == ':' {
			j := i + 1

			r.insert(method, path[:i], nil, skind, "", nil)
			for ; i < l && path[i] != '/'; i++ {
			}

			pnames = append(pnames, path[j:i])
			path = path[:j] + path[i:]
			i, l = j, len(path)

			if i == l {
				r.insert(method, path[:i], h, pkind, ppath, pnames)
			} else {
				r.insert(method, path[:i], nil, pkind, "", nil)
			}
		} else if path[i] == '*' {
			r.insert(method, path[:i], nil, skind, "", nil)
			pnames = append(pnames, "*")
			r.insert(method, path[:i+1], h, akind, ppath, pnames)
		}
	}

	r.insert(method, path, h, skind, ppath, pnames)
}
758130
func (c *Client) Put() {
	select {
	case b := <-c.sent:
		c.p.ch <- b
	default:
	}
}
633727
func (s *Server) Put(path string, h HandlerFunc, opts ...HandlerOption) {
	s.register(http.MethodPut, path, h, opts...)
}
311996
func (r *SubRouter) PUT(route string, handler interface{}) *SubRouter {
	route = r.prefixedRoute(route)
	if r.parent != nil {
		r.parent.handleReg(MethodPUT, route, handler, r.prefixes)
	}

	return r
}
251100
func (m *MockRestClientInterface) Put() *rest.Request {
	ret := m.ctrl.Call(m, "Put")
	ret0, _ := ret[0].(*rest.Request)
	return ret0
}
405350
func (r *Router) Put(path string, h http.HandlerFunc) {
	r.rtr.PUT(r.prefix+path, r.handle(path, h))
}
201791
func (r *Request) AddPath(path string) *Request {
	r.Use(url.AddPath(path))
	return r
}
125486
func (e *Echo) PUT(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
	return e.Add(http.MethodPut, path, h, m...)
}