<div dir="ltr"><br><div style><div>Hi,</div><div><br></div><div>Today when we set up a Pipe and call methods on it, we have a different ways on how we can pass the  stuff which are part of the URI and more particularly the leading or ending &quot;/&quot; :</div>
<div><br></div><div>```</div><div>baseURL: &quot;<a href="http://www.slackers.com">http://www.slackers.com</a>&quot; //no ending slash </div><div>endpoint: &quot;/security&quot; //we have to start with a slash</div><div>```</div>
<div>But we can also do it the otherr way around :</div><div><br></div><div>```</div><div>baseURL: &quot;<a href="http://www.slackers.com/">http://www.slackers.com/</a>&quot; //ending slash </div><div>endpoint: &quot;security&quot; //no starting slash</div>
<div>```</div><div><br></div><div>Both are valid because our library (at least JavaScript) don&#39;t do any manipulation for ```baseURL``` and ```endpoint```.</div><div><br></div><div>But if you take the parameter ```id``` on the ```read``` function, this one must not have a leading &quot;/&quot; because it&#39;s added by the library:</div>
<div>```</div><div>id: &quot;team1&quot; //works</div><div>id: &quot;/team&quot; //fails</div><div>```</div><div>Until now ```id``` was the last part of the URI but since we are planning to add nested resources, ```id``` won&#39;t be necessarily the last fragment. For example, we could have a new parameter called ```resource``` to be appended at the end :</div>
<div><br></div><div>```</div><div>baseURL = &quot;<a href="http://www.slackers.com/">http://www.slackers.com/</a>&quot; //ending slash </div><div>endpoint: &quot;security&quot; // no starting slash</div><div>id: &quot;5&quot; // handled by lib</div>
<div>resource: &quot;/crypto&quot; //leading slash needed</div><div>```</div><div>As the spirit of Pipes (at least for REST) is to offer an abstraction around the Ajax and URL handling plumbing code, I think we should have a convention for passing URI fragments that is the same for all. My suggestion is to do the same as for ```id``` : no leading ``` / ``` or ending ``` / ```.</div>
<div><br></div><div>If the user passes  a leading or ending ``` / ```, the library will removed it because it will be added implicitly. This way we are safe.</div><div><br></div><div>Remarks ? Questions ? </div><div>  </div>
<div><br></div><div style>  Seb</div><div style><br></div></div></div>