Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there a standard syntax for encoding structure objects as HTTP GET request parameters?
    primarykey
    data
    text
    <p>Imagine we need to pass a a number structured objects to the web application - for instance, locale, layout settings and a definition of some query. This can be easily done with JSON or XML similar to the following fragment:</p> <pre><code>&lt;Locale&gt;en&lt;/Locale&gt; &lt;Layout&gt; &lt;Block id="header"&gt;hide&lt;/Block&gt; &lt;Block id="footer"&gt;hide&lt;/Block&gt; &lt;Block id="navigation"&gt;minimize&lt;/Block&gt; &lt;/Layout&gt; &lt;Query&gt; &lt;What&gt;water&lt;/What&gt; &lt;When&gt; &lt;Start&gt;2010-01-01&lt;/Start&gt; &lt;/When&gt; &lt;/Query&gt; </code></pre> <p>However, passing such structures with HTTP implies (roughly speaking) HTTP POST.</p> <p>Now assume we're limited to HTTP GET. Is there some kind of a standard solution for encoding structured data in HTTP GET request parameters?</p> <p>I can easily imagine something like:</p> <pre><code>Locale=en&amp; Layout.Block.header=hide&amp; Layout.Block.footer=hide&amp; Layout.Block.navigation=minimize&amp; Query.What=water&amp; Query.When.Start=2010-01-01 </code></pre> <p>But what I'm looking for is a "standard" syntax, if there's any.</p> <p>ps. I'm surely aware of the problem with URL length. Please assume that it's not a problem in this case.</p> <p>pps. I'd be also greatful for links to key-value pair URL APIs (like <a href="https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&amp;content_ID=developer/e_howto_api_nvp_NVPAPIOverview" rel="nofollow noreferrer">Paypal NVP</a>) which you think to be worth taking a look at.</p> <p>ppps. We're certainly forseeing the callback URLs but we need HTTP GET key-value pairs as well. The question focuses on the latter.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload