User Tools

Site Tools


libraries:restwebservice:restrequestclass:getnamedparameters

RestRequest::getNamedParameters()


Definition

Returns the named parameters of the current request as array.
Named parameters are URL parameters sent by the client with the pattern <key>=<value>.

Array getNamedParameters ( )

Returns

  • Array
    Named parameters used in the URL of the request as associative array with given key and value.
    The keys are alyways converted to lower case!

Example

$Request = new RestRequest();
 
// Called endpoint is: [PUT] https://www.domain.com/webservice/accounting/booking?debug=true
// Content is:         "id:5,account:1234,name:Mr. Smith,amount:592.30"
 
$Application = $Request->getApplication(); // "accounting"
$Method      = $Request->getMethod();      // "booking"
 
if ( $Request->hasNamedParameters() ) // true
{
   if ( $Request->getNamedParameters['debug'] == 'true' )
   {
      [...]
   }
}
libraries/restwebservice/restrequestclass/getnamedparameters.txt · Last modified: 2022/12/21 20:12 by michael.pohl