Accessing the enitre path in an argument

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
rylowry@gmail.com's picture

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

Hugo Wetterberg's picture

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

rylowry@gmail.com's picture

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:

Hot content this week