User Tools

Site Tools


libraries:restwebservice:restrequestclass:getrestverb

RestRequest::getRestVerb()


Definition

Returns the used REST verb. By default, the follwoing verbs are common: GET, POST, PUT, DELETE
As the webservice allows to use any verb, it can be different from the common default verbs.

String gerRestVerb ( )

Returns

  • String
    REST verb used by the requesting client (always upper case).

Example

$Request = new RestRequest();
 
// Called endpoint is: [PUT] https://www.domain.com/webservice/accounting/booking
// Content is:         "id:5,account:1234,name:Mr. Smith,amount:592.30"
 
$UsedRestVerb = $Request->getRestVerb();  // "PUT"
libraries/restwebservice/restrequestclass/getrestverb.txt · Last modified: 2022/12/21 19:44 by michael.pohl