_API_MGR_ROUTER_Register

Register a HTTP route with a callback.

_API_MGR_ROUTER_Register($method, $route, $callBack, $requiredParams = "", $description = "No description", Const $mainSocket = $g__API_MainSocket)

Return Value

None

Remarks

The $callback param CAN have 2, 1 or 0 (ZERO) params. Func MyCallback(Const $oRequest, Const, $oHeaders), Func MyCallback(Const $oRequest), Func MyCallback(). The $requiredParams has the following format "type Name<*required>" and is separated by pipelines, for example. "string name*" = "String $name (Required)", if <*> is not used, the result will be "String $name (Optional)"

Related

_API_MGR_ROUTER_Prefix, _API_MGR_ROUTER_HANDLE, _API_MGR_ROUTER_GET, _API_MGR_ROUTER_POST, _API_MGR_ROUTER_PUT, _API_MGR_ROUTER_PATCH, _API_MGR_ROUTER_DELETE