Skip to content
This repository has been archived by the owner on Sep 22, 2019. It is now read-only.

Use GET instead of POST where possible #221

Open
jar398 opened this issue Apr 21, 2016 · 0 comments
Open

Use GET instead of POST where possible #221

jar398 opened this issue Apr 21, 2016 · 0 comments

Comments

@jar398
Copy link
Member

jar398 commented Apr 21, 2016

The HTTP spec says to use GET when the operation has no side effects. GET is superior to POST because

  • it is easy to cache
  • the arguments show up in the http logs

Idiotically, and in defiance of the spec, neo4j provides no way for plugins to handle GET requests, other than what it calls "unmanaged plugins". What they mean by "management" is just a thin layer of parsing and checking arguments, and catching exceptions to turn them into appropriate non-200 responses. It's very easy to replicate the exception part, and parsing CGI query strings is not hard. So this is doable.

The unmanaged GET methods can simply call the doXXX Java methods in tree_of_life_v3.java. There will need to be new apache redirects for the GET methods.

Prior siscussion here:
https://groups.google.com/forum/#!topic/opentreeoflife-software/3tFVAWagZvI
https://trello.com/c/NGa9Rbif/203-think-about-performance-esp-caching-the-results-of-tree-taxomachine-queries

Branch with failed approach here:
https://github.com/OpenTreeOfLife/treemachine/tree/unmanaged

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant