<div dir="ltr">Hey, <div><br></div><div style>there was some talk yesterday on IRC about what should be returned by AeroGear Controller if you go beyond past the last page. There was talk of responding with "204 No Content" with an empty body, or responde with "200 OK" and a body containing an empty array (in the case of returning a JSON responds).</div>
<div style><br></div><div style>I've update the controller-demo with the "200 OK" version, but let me know if this should be changed.</div><div style><br></div><div style><h4 style="margin:20px 0px 10px;padding:0px;font-size:16px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif">
"Paging" beyond the last page of Cars</h4><div class="" style="border:none;padding:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px"><pre style="font-size:13px;line-height:19px;font-family:Consolas,'Liberation Mono',Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
curl -i --header <span class="" style="color:rgb(221,17,68)">"Accept: application/json"</span> <span class="" style="color:rgb(221,17,68)">"<a href="http://controllerdemo-danbev.rhcloud.com/aerogear-controller-demo/cars?offset=200&limit=5">http://controllerdemo-danbev.rhcloud.com/aerogear-controller-demo/cars?offset=200&limit=5</a>"</span>
</pre></div><div class="" style="border:none;padding:0px;color:rgb(0,0,0);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px"><pre style="font-size:13px;line-height:19px;font-family:Consolas,'Liberation Mono',Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<span class="">HTTP</span><span class="" style="font-weight:bold">/</span><span class="" style="color:rgb(0,153,153)">1.1</span> <span class="" style="color:rgb(0,153,153)">200</span> <span class="">OK</span>
<span class="">AG</span><span class="" style="font-weight:bold">-</span><span class="">Total</span><span class="" style="font-weight:bold">:</span> <span class="" style="color:rgb(0,153,153)">16</span>
<span class="">AG</span><span class="" style="font-weight:bold">-</span><span class="">Links</span><span class="" style="font-weight:bold">-</span><span class="">First</span><span class="" style="font-weight:bold">:</span> <span class="">cars</span><span class="" style="font-weight:bold">?</span><span class="">offset</span><span class="" style="font-weight:bold">=</span><span class="" style="color:rgb(0,153,153)">0</span><span class="" style="font-weight:bold">&</span><span class="">limit</span><span class="" style="font-weight:bold">=</span><span class="" style="color:rgb(0,153,153)">5</span>
<span class="">AG</span><span class="" style="font-weight:bold">-</span><span class="">Links</span><span class="" style="font-weight:bold">-</span><span class="">Last</span><span class="" style="font-weight:bold">:</span> <span class="">cars</span><span class="" style="font-weight:bold">?</span><span class="">offset</span><span class="" style="font-weight:bold">=</span><span class="" style="color:rgb(0,153,153)">11</span><span class="" style="font-weight:bold">&</span><span class="">limit</span><span class="" style="font-weight:bold">=</span><span class="" style="color:rgb(0,153,153)">5</span>
<span class="">Content</span><span class="" style="font-weight:bold">-</span><span class="">Type</span><span class="" style="font-weight:bold">:</span> <span class="">application</span><span class="" style="font-weight:bold">/</span><span class="">json</span><span class="">;</span><span class="">charset</span><span class="" style="font-weight:bold">=</span><span class="">UTF</span><span class="" style="font-weight:bold">-</span><span class="" style="color:rgb(0,153,153)">8</span>
<span class="">Content</span><span class="" style="font-weight:bold">-</span><span class="">Length</span><span class="" style="font-weight:bold">:</span> <span class="" style="color:rgb(0,153,153)">2</span>
<span class="">[]</span></pre></div></div><div style><br></div><div style><br></div><div style>gist: <a href="https://gist.github.com/4500336">https://gist.github.com/4500336</a></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On 17 January 2013 17:39, Douglas Campos <span dir="ltr"><<a href="mailto:qmx@qmx.me" target="_blank">qmx@qmx.me</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, Jan 17, 2013 at 05:10:56PM +0100, Matthias Wessendorf wrote:<br>
> On Tue, Jan 15, 2013 at 11:55 AM, Douglas Campos <<a href="mailto:qmx@qmx.me">qmx@qmx.me</a>> wrote:<br>
> > standards++<br>
><br>
> Looks like we agreed on using the RFC 5988 for the linking.<br>
><br>
> I think we "just" need to decide on the actual values...<br>
><br>
> 1) the standard uses "previous" and "next"<br>
</div>no-brainer - let's follow the standards<br>
<br>
-- qmx :)<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</div></div></blockquote></div><br></div>