Page 1 of 1

mySQL REST API access

Posted: Thu Nov 08, 2012 10:19 am
by davidsch
Can we get advice on accessing mySQL via REST API? Here's where we're stuck:

[10:07:15 AM] Raman: REST api uses unusual HTTP methods like PUT and DELETE
[10:07:38 AM] Raman: normally HTTP works for GET and POST method
...
[10:08:22 AM] Raman: I already fixed it for my local server earlier today but for some reason same fix is not working for live website
[10:08:46 AM] David Schoenbach: show me the code of the fix
[10:09:15 AM] Raman: in /api/.htaccess file
[10:09:56 AM] Raman: These lines:

<LimitExcept GET POST PUT DELETE>
order deny,allow
allow from all
</LimitExcept>

solved this issue on my local server
[10:12:05 AM] David Schoenbach: is the relative path different because it's on the Sonic server instead of your local machine? Do you have Sonic's path info for MySQL?
[10:12:46 AM] Raman: we don't need physical path, it works for the folder in which .htaccess file is placed
[10:13:17 AM | Edited 10:13:28 AM] Raman: so fix in .htaccess file in /api folder should accept HTTP PUT for all files in /api folder

Thx!

Re: mySQL REST API access

Posted: Fri Nov 09, 2012 3:11 pm
by davidsch
Is there a restriction on how I use .htaccess? Can you do put and delete enabled there through apache?