marklogic-community / Corona

Community REST API for MarkLogic
Other
37 stars 9 forks source link

RFE: The /search endpoint should support POST #46

Closed hunterhacker closed 12 years ago

hunterhacker commented 12 years ago

Some structured queries will be very large. Should be able to POST them.

In the docs we should make clear you post the params, one of which is JSON or XML, and you don't post JSON or XML as its own request body.

eedeebee commented 12 years ago

Most endpoints that support GET should also support POST.

ryangrimm commented 12 years ago

This was supported earlier but got lost in the merge of string queries and structured queries. I've added support for POST back in.

That said, I'm not 100% sure if this a good idea or not. GET and POST are fundamentally different, especially when it comes to caching which our users (and hence us) will likely care about. If MarkLogic doesn't have any hard coded length limitations for GET requests, I'm inclined to only support GET for such requests.

So for the time being I'm going to leave this issue open so others can weigh in with opinions.

hunterhacker commented 12 years ago

We should probably empirically verify how well MarkLogic handles super-long URLs.

Course, even if MarkLogic can handle URLs of arbitrary length, that doesn't mean the load balancer or caching proxy that someone uses will be able to.

ryangrimm commented 12 years ago

Well… that's a good point! Okay, I'll embrace POST support. Added it to /facet and /kvquery as well.