Am 23.04.2013 um 20:52 schrieb Camillo Bruni <camillobruni@gmail.com>:
I just had a quick peek, shouldn't that be all post requests?
get does not support a body, you have to pass everything as url parameters.
Can you elaborate on this? Why does GET not "support" a body? There is just no explicit mentioning of it in the rfc but on the same track there is no exclusion for that scenario. Norbert
On 2013-04-23, at 20:41, Paul DeBruicker <pdebruic@gmail.com> wrote:
I'm making an elasticsearch client and they utilize JSON bodies in the GET requests to their server to search and do other things. An example of that is the second code block here:
http://www.elasticsearch.org/guide/reference/api/search/
Is there a way to include a body with a GET request using Zinc?
Making this:
ZnClient>>#get:contents: "Execute an HTTP GET request on url with the contents in a body and return the response #contents."
^ self url: url; contents: object; get
(unsurprisingly) doesn't work right away.
In elasticsearch it is possible to make a URI request for searching but it is a more limited interface than including the JSON body.
Thanks
Paul