Always getting method error

upupax - November 4, 2009 - 18:35
Project:JSON server
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I'm trying to understand if my server json works, but when I try to use curl to check the methods I always get this error:

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

This is what I used:
curl --data method=system.connect http://mysite.com/mydrupalfolder/services/json

Just to give you more information: my installation is not in the root of my site and I have clean URL's enabled.

Any idea?
Thank you in advance.

#1

nicholasThompson - November 8, 2009 - 21:27
Status:active» fixed

The method's value is considered a JSON value. For a JSON value to be a string, it should be enclosed in double quotes. This threw me for several hours too...

Try:

curl http://vmtest6/services/json --data method=\"system.getServices\"

Please re-open if this does not help...

#2

System Message - November 22, 2009 - 21:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.