-
Notifications
You must be signed in to change notification settings - Fork 2
Description
When experimenting with the varserver I did not fully read the documentation and, on autopilot, used GET requests to get things done. I see the example code uses POST requests, as does cgi. Coming from a lot of REST experience, I would expect to retrieve values using GET and change values using POST or PUT. The documentation does not suggest that varserver is a REST API, so this is all minor.
pypvs is just a wrapper (but also uses POST exclusively), and as such, hides this detail.
What I did find, using GET requests, where the parameters are encoded as query variables is that there is an issue with properly encoded parameter values.
Many of the parameter values will need slashes in them, and they are properly encoded us %2F, but if/when you do that, the API rejects the request. If you leave the slashes alone, everything will work.
So, I would suggest:
- Fix the code (in varserver) to properly decode percent encoded query parameters
- Document the GET requests can also be used