3dgeo-heidelberg / pytreedb

Python package providing a file and object-based database to store tree objects.
Other
28 stars 4 forks source link

R example with POST #70

Closed bhoefle-3dgeo closed 2 years ago

bhoefle-3dgeo commented 2 years ago

I thought we changed to GET? Is the current R script working with the POST?

lwiniwar commented 2 years ago

Methods that use more complex DB queries use the POST method on all current branches, e.g.

https://github.com/3dgeo-heidelberg/pytreedb/blob/de90876dbbeeeb0b4369d2ccd0ede5fdae39eaa7/webserver/pytreedb_server/__main__.py#L103

https://github.com/3dgeo-heidelberg/pytreedb/blob/f4d3d730f4829d73fe6097d6aab276040ae1485f/webserver/pytreedb_server/__main__.py#L105

https://github.com/3dgeo-heidelberg/pytreedb/blob/c6e003c563ce1e960f98a0dd73b82db8c178a34e/webserver/pytreedb_server/__main__.py#L105

The R script reflects that: https://github.com/3dgeo-heidelberg/pytreedb/blob/c6e003c563ce1e960f98a0dd73b82db8c178a34e/examples_api/example.R#L38

Typically, length limits for POST are much higher than for GET, and very complex queries might run into problems with GET (>2000 characters/bytes)