views:

117

answers:

1

I have been trying to get a stock Drupal site up and running with JSON Server module and Services. After install I added the two modules and enabled them. When I use Curl from the command line to call system.connect or anything I only get Invalid Method.

curl --data method=system.connect http://localhost/services/json

This is what I am getting back.

{ "#error": true, "#data": "Invalid method " }
A: 

I remember having the same problem myself a while back. Your problem at the moment is that your post data does not have quotes.

curl --data 'method="system.connect"' http://localhost/services/json

If you have a look at this: http://drupal.org/node/305799 it should give you loads more info to get you going with services and the json server.

hookd
Thanks that was my issue. Now I just have to figure out why even though my parameters are optional it is stating "Argument fields not recieved.
cjibo
From that error message it sounds as though for some reason there is a parameter called fields which isn't optional for some reason. Have you got '#optional' set to 1 for that method?
hookd