User Tools

Site Tools


libraries:restwebservice:restrequestclass

RestRequest class


With every request the client sends a lot of data/information to the webservice. This data is collected in a 'Request' object of this type.

Important! You don't have to create an object of this class. Because of the fact, that each webservice application has to extend 'ApplicationTemplate', this object does automatically exist in your webservice application.

Constructors

__construct() Instantiates a new instance of RestRequest class and does all the necessary initialization.

Properties

none

Methods

getApplication() Returns the requested application name.
getContent() Returns the content as it was sent by the client via request.
getContentLength() Returns the length of the content sent by the request (usually used by POST/PUT).
getContentType() Returns the content type sent by the request.
getFileParameters() Returns the file parameters of the request as array.
getHeader() Returns the header of the request as an associative array.
getHeaderValue() Returns the value of a named header field.
getJsonContent() Returns a transmitted JSON content as array structure.
getMethod() Returns the method of the applcation to execute.
getNamedParameters() Returns the list of named parameters of the request in an array.
getRestVerb() Returns the used REST verb. By default, the follwoing verbs are common: GET, POST, PUT, DELETE
getUnnamedParameters() Returns the list of unnamed parameters of the request in an array.
getUrl() Returns the original request URL.
hasFileParameters() Checks if there exist file parameters in the current request.
hasNamedParameters() Checks if there exist named parameters in the current request.
hasUnnamedParameters() Checks if there exist unnamed parameters in the current request.
removeUnnamedParameters() Removes the unnamed parameter at the given index.
libraries/restwebservice/restrequestclass.txt · Last modified: 2022/12/21 19:03 by michael.pohl