<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="130259" data-post-id="130259">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="peerreynders" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/peerreynders/120/5826_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  peerreynders
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I already outlined that above.</p>
<ul>
<li>the resource is identified via the canonical URI</li>
<li>duplicate URI’s either redirect or identify themselves as duplicates of the original resource (the latter being the one suited to your use case, the former really isn’t that helpful).</li>
</ul>
<p>Now how that behaviour for the duplicate URIs is implemented is a technical matter.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="130259" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-there-a-best-practice-for-forming-json-etc-urls/22747/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-130259" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="130259"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="130262" data-post-id="130262">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="OvermindDL1" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/OvermindDL1/120/2677_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  OvermindDL1
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="peerreynders" data-post="12" data-topic="22747">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/peerreynders/48/5826_2.png" class="avatar"> peerreynders:</div>
<blockquote>
<p>duplicate URI’s either redirect or identify themselves as duplicates of the original resource (the latter being the one suited to your use case, the former really isn’t that helpful).</p>
</blockquote>
</aside>
<p>I’m curious how it would identify itself as a duplicate, is it via a header, as the only thing sent is, for example, an excel file?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="130262" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-there-a-best-practice-for-forming-json-etc-urls/22747/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-130262" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="130262"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="130265" data-post-id="130265">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="peerreynders" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/peerreynders/120/5826_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  peerreynders
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>A request going to <code>resource/xlsx</code> would get a response with a <code>Content-Type</code> of<br>
<code>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</code><br>
and a <code>Content-Location</code> header of <code>resource</code>.</p>
<p>Of course that only makes sense if <code>resource</code> is capable of processing an Accept header for<br>
<code>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</code><br>
to respond with that media type.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="130265" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-there-a-best-practice-for-forming-json-etc-urls/22747/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-130265" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="130265"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="130266" data-post-id="130266">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="OvermindDL1" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/OvermindDL1/120/2677_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  OvermindDL1
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="peerreynders" data-post="14" data-topic="22747">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/peerreynders/48/5826_2.png" class="avatar"> peerreynders:</div>
<blockquote>
<p>Of course that only makes sense if <code>resource</code> is capable of processing an Accept header for<br>
<code>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</code><br>
to respond with that media type.</p>
</blockquote>
</aside>
<p>Well it’s excel, I don’t think it checks at all, it just downloads and uses it, and it wouldn’t use <code>Content-Location</code> either I’d imagine.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="130266" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-there-a-best-practice-for-forming-json-etc-urls/22747/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-130266" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="130266"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="130267" data-post-id="130267">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="NobbZ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/NobbZ/120/27235_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  NobbZ
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I do read your link the other way round. Content redirects to the path containing the format, but the format URL version has no way to link back.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="130267" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-there-a-best-practice-for-forming-json-etc-urls/22747/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-130267" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="130267"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="130269" data-post-id="130269">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rodrigues" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rodrigues/120/23387_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rodrigues
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I wouldn’t say this is used enough to be considered a best practice at all – and I don’t know if that would be the best for your case, but a “standard” way of describing URLs with client parameters is brought by the <a href="https://tools.ietf.org/html/rfc6570" rel="noopener nofollow ugc"><strong>URI Template</strong> specification</a></p>
<p>Some examples:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">http://example.com/~{username}/
http://example.com/dictionary/{term:1}/{term}
http://example.com/search{?q,lang}
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="130269" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-there-a-best-practice-for-forming-json-etc-urls/22747/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-130269" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="130269"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="130271" data-post-id="130271">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="peerreynders" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/peerreynders/120/5826_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  peerreynders
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="OvermindDL1" data-post="15" data-topic="22747">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>it wouldn’t use <code>Content-Location</code> either I’d imagine.</p>
</blockquote>
</aside>
<p>That’s beside the point - i.e. that is Excel’s lookout. If it simply accepts what was dumped in it’s lap and only barfs when it can’t process the file … <img src="https://forum.elixirforum.com/images/emoji/apple/man_shrugging.png?v=15" title=":man_shrugging:" class="emoji" alt=":man_shrugging:" loading="lazy" width="20" height="20">.</p>
<p>And while Excel may not care about the <code>Content-Location</code> something else might be by first sending a  <code>HEAD</code> request and then not bother (because it already got <code>resource</code>) with a full <code>GET</code>.</p>
<aside class="quote no-group" data-username="NobbZ" data-post="16" data-topic="22747">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nobbz/48/27235_2.png" class="avatar"> NobbZ:</div>
<blockquote>
<p>I do read your link the other way round.</p>
</blockquote>
</aside>
<p>Yes, you’re right. And the <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.14" rel="noopener nofollow ugc">spec</a> seems to read that way, i.e. pointing from the <a href="https://www.w3.org/DesignIssues/Generic.html" rel="noopener nofollow ugc">generic</a> to the specific - which would be absolutely useless to establish the canonical URI.</p>
<p>Which would explain why <a href="https://webmasters.googleblog.com/2009/02/specify-your-canonical.html" rel="noopener nofollow ugc">search engines</a> resort to</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">&lt;link rel="canonical" href="http://www.example.com/product.php?item=swedish-fish" /&gt;

</code></pre>
<p>but that only helps with HTML - not with general HTTP responses.</p>
<p>I was lead by <a href="https://www.crummy.com/writing/RESTful-Web-Services/RESTful_Web_Services.pdf" rel="noopener nofollow ugc">Restful Web services</a> p.84.</p>
<aside class="quote no-group">
<blockquote>
<p>Another way is to serve all the URIs as though they were the same, but give the “canonical” URI in the <code>Content-Location</code> response header whenever someone requests a non-canonical URI.</p>
</blockquote>
</aside>
<p>The revised <em>Restful Web API</em> is contradictory p.324:</p>
<aside class="quote no-group">
<blockquote>
<p>This header <strong>tells the client the canonical URL</strong> of the resource it requested. Unlike with the value of the Location header, this is purely informative. The client is not expected to start using the new URL.<br>
…<br>
So if you request <code>/documents/104</code>, and use the <code>Accept</code> and <code>Accept-Language</code> headers to specify an HTML representation written in English, you might get back a response that specifies <code>/documents/104.html.en</code> as the value for <code>Content-Location</code>. That’s the link to one specific representation of the resource.</p>
</blockquote>
</aside>
<p>So that would only leave the redirects which is useless for avoiding the use of <code>Accept</code> headers.</p>
<p>Seems the canonical IRI has been pushed into <a href="https://www.w3.org/TR/annotation-model/#other-identities" rel="noopener nofollow ugc">Web Annotation Data Model</a> (again not very useful for pruning unnecessary <code>GET</code> requests by using <code>HEAD</code> requests first).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="130271" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/is-there-a-best-practice-for-forming-json-etc-urls/22747/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-130271" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="130271"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>