[support] Getting restws configured
Jeff Greenberg
listmail.ayendesigns at gmail.com
Thu Dec 12 13:18:26 UTC 2013
Taking Lucas's suggestion of using restws, I have configured the path in
the module as such:
function mymodule_restws_resource_info() {
return array(
'mymodule_person' => array(
'label' => t('Person'),
'class' => 'PersonResourceController',
'menu_path' => 'api/person',
),
);
}
That part seems to work, because when I send a POST transaction via
Advanced Rest Client in chrome, I get a 200 response (I get a 404 if I
change the request url).
That said, in the module I also throw an error if attempting an update,
delete or read. When I send any of those, I still get a 200 response.
Any of GET, POST, PUT or UPDATE gives me
Response does not contain any data
including the create method in the resource controller, so it's not firing.
Do I need to do something to invoke it beyond hitting the api/person with a
post payload?
--
---
drupal.org/user/367108
linkedin.com/in/jeffrgreenberg
accidentalcoder.com / ayendesigns.com
@accidentalcoder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20131212/57f43cd1/attachment.html
More information about the support
mailing list