specs icon indicating copy to clipboard operation
specs copied to clipboard

Submitting queries as JSON without URL-encoding them

Open wetneb opened this issue 5 years ago • 2 comments

It is more natural in a REST API to submit a JSON payload as a POST query with Content-Type: application/json rather than to URL-encode it in a queries= parameter as we are currently doing.

We could introduce this change in new version, and perhaps keep URL-encoding for the GET method, since it could still be useful for interactive testing, although the testbench should hopefully decrease the need for this in the future.

Changing this would make it easier to expose OpenAPI profiles (#17) for reconciliation services.

wetneb avatar Jan 11 '20 09:01 wetneb

+1 for making the payload application/json which is the normal convention.

I just submitted #33 and I suggest that both changes could be implemented as the same time, as both are breaking changes (though in both cases, a service endpoint could be written to support both the old and the new style).

osma avatar Jan 11 '20 18:01 osma

It is more natural in a REST API to submit a JSON payload as a POST query with Content-Type: application/json rather than to URL-encode it in a queries= parameter as we are currently doing.

👍 agree as well

thadguidry avatar Feb 11 '20 13:02 thadguidry