Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST POST 'command' on the REST it behaves like a GET, and has issues with authentication [moved] #141

Closed
lvca opened this issue Dec 10, 2012 · 0 comments

Comments

@lvca
Copy link
Member

lvca commented Dec 10, 2012

This is Issue 141 moved from a Google Code project.
Added by 2010-10-25T17:18:25.000Z by gsta...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).

Original labels: Type-Defect, Priority-Medium, v0.9.24

Original description

From the docs:

POST

Execute a SQL command against the database. Returns the records affected or the list of records for queries. In the future other languages will be supported.

Syntax: http://<server>:[<port>]/command/<database>/sql

content: <command-text>


Reality:

It behaves like a GET request like this:

POST http://<server>:[<port>]/command/sql/<database>/<query>

So not only the syntax is incorrect in the docs ('sql' comes first, then <database>) it also requires the whole sql query to be in line with the uri. I'd expect it to behave like the 'query' function where it gets the content in the body like a normal POST request.

Also, while all the other functions are accessible with inserting a Basic auth in the headers, this one doesn't, and requires you to firstly grab the cookie from a 'connect' or other function inserted in the headers for it to function, otherwise throws a 401. Is this on purpose?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant