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

Use GET instead of POST where possible #221

@jar398

Description

@jar398

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions