Open dhylands opened 8 years ago
That makes sense. The main problem I have with this is that we want getters to be used with GET
, so we want to avoid putting a body in the requests. I imagine that we could restrict ourselves to passing strings in HTTP headers, but if we end up passing complex data structures encoded in HTTP headers, we have done something wrong.
What do you think?
If we can send a string then we can send JSON.
Well needing to hide JSON in a String means that we have done something wrong. I'll need to think more about it.
I came up with some examples where having a getter take parameters would be useful:
1 - Retrieving an image with some type of conversion specifier (i.e. format jpeg/png, scaling factor) 2 - Retrieving historical sensor data and specifying a date/time range that you're interested in