Accessing the enitre path in an argument

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by rylowry@gmail.com on July 6, 2011 at 8:53pm

My question pertains to Services 7.x-3.0-rc3

When creating a webservice you can easily map parts of the path to arguments like so:

<?php
'args' => array(
array(
'name' => 'name',
'type' => 'string',
'source' => array('path' => 0),
'optional' => FALSE,
),
?>

That's great if you only want the first part of the path, but what if I wanted the entire path. For example, say I have a url that looks like this:

http://www.example.com/endpoint/resource/some/long/path

Is it possible to map "some/long/path" to an argument, rather than just "some" or "long" or "path"?

Comments

Yep, as soon as this patch is

Posted by Hugo Wetterberg on July 6, 2011 at 9:02pm

Yep, as soon as this patch is in http://drupal.org/node/1083242 you can just specify "source" => "path" and you will get the whole, endpoint-relative path.

Great news, thanks for the

Posted by rylowry@gmail.com on July 6, 2011 at 10:19pm

Great news, thanks for the info!

Services

Group organizers

Group categories

Group notifications

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

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