pystac-client icon indicating copy to clipboard operation
pystac-client copied to clipboard

[RFC] Default to `GET` for item search?

Open gadomski opened this issue 1 year ago • 2 comments

Since POST is recommended but not required, it can be surprising to users when pystac-client defaults to POST (e.g. https://github.com/stac-utils/pystac-client/issues/641). On the other hand, any sort of complicated intersects will probably blow up a GET request. I'm not quite sure what the most user-friendly logic is here, anyone have thoughts?

gadomski avatar Feb 19 '24 14:02 gadomski

From @philvarner in Slack:

landing page link -- if it has a link with rel=search without a method field, it assumed to be GET a link with method = POST defines that it supports post, and likewise with GET

We should check the landing page and default to GET if it doesn't have a POST search link.

gadomski avatar Feb 19 '24 14:02 gadomski

maybe also have an override to force POST regardless of what's advertised

philvarner avatar Feb 19 '24 15:02 philvarner