SA-MP 0.3b RC1 & RC2 Released

Another thing which the HTTP funtion allows:
You can make use of a database server, which is as powerful as MySQL, without a connector plugin. The nosql database couchdb allows you to do queries with a HTTP API, also over localhost. You would only need a function to extract your data from json data and store data in the json format.
You could also connect to a script (php in most cases) of course and let the script do it, but this would be faster since it DIRECTLY connects to the DB. (And a nosql database and some advantages over sql databases, like you don't have to care about tables).
I tested this and works.
Request url:localhost:5984/samp/remis
Example output: {"_id":"remis","_rev":"1-967a00dff5e02add41819138abb3284d"}
Each player would have a document.

But I created the document with couchdb's admin interface, since documents created by POST request to couchdb have numbers generated by the server as name.
For generating documents with a custom name ("remis") you would need PUT.

It would be great, if SA-MP's HTTP Client could also support PUT. Then you also wouldn't need scripts to do what you want.
 
Back
Top Bottom