Niranjan
Niranjan
Executing following code base = 'http://foo.com/api/xml'.to_uri p base.to_template("bar/:id").uri_pattern base = 'http://foo.com/api/xml/'.to_uri p base.to_template("bar/:id").uri_pattern base = 'http://foo.com/api/xml'.to_uri p base.to_template("/bar/:id").uri_pattern Produces "http://foo.com/api/bar/:id" "http://foo.com/api/xml/bar/:id" # Expected behaviour (Considering p base["/bar"].uri_string to be standard)...
While extending the uri template using Wrest::UriTemplate#[] clone the existing template without copying associated options. This behaviour is not same as Wrest::Uri#[] method.