Quick question ... testing the REST web services

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by happylrac on July 17, 2011 at 7:13am

I have a quick question. I have the Services REST server up with all the resources, and know that it is working. What I would like to do is use an app like Fetcher for the Mac or Poster for Firefox to attempt to login as a user. I am using GET and expect that the url will be something like

"http: //localhost:8080/endpoint/user/login?username=my_username&password=my_password"

but that doesn't seem to work. The REST server is returning "406 Not Acceptable: There is no user with ID 0". Can someone please set me straight here?

Comments

POST ?

Posted by mojzis on July 17, 2011 at 8:33am

shouldnt you use post for login ?

True - you shouldn't be able

Posted by voxpelli on July 17, 2011 at 12:37pm

True - you shouldn't be able to log in through a GET as that would be vulnerable to CSRF-attacks. So use POST instead and send the arguments in the POST body.

hah

Posted by happylrac on July 17, 2011 at 2:12pm

That's it. Thanks guys!

Services

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /