lvh/icecap

Parametrization

Opened this issue · 0 comments

lvh commented

Right now, caps don't support parametrization.

Since the way you exercise caps right now is via GET, the only option to pass in parameters is through URL queries. That might be sufficient, but it's also very limited and requires doing a bunch of coercion nonsense that should really be a parser's job.

POST could come to the rescue. POST with a body means exercise with parameters; GET could be implemented the same way except with nil or {} parameters. While not the most RESTful solution (you'd expect a subresource, but obviously icecap does not want to keep track of how often you've exercised a capability, let alone making that a first-class thing...)...

  • Figure out how to implement parametrization
  • Actually implement parametrization
  • Document in tutorial
  • Document in REST API