PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
New WINDEV, WEBDEV 24 feature!
  • Overview
  • Characteristics
  • Advanced cases
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
REST Services: Prologue procedure (executed before each call)
Overview
It is now possible to specify that a procedure must be called (and executed automatically) each time a Webservice is called. This makes it possible, for example, to set up security or billing systems, such as checking a token passed in the header.
Characteristics
This procedure is run every time an entry point is called, just before the procedure associated with that entry point.
This procedure makes it possible to run code that must be run for all the entry points. For example, verify that the client has authenticated himself and that he has the right to call the entry points.
All Webservice functions are available during the call to this procedure.
It is possible to reject the call to the entry point:
  1. Calling WebserviceWriteHTTPCode to give the return code and the possible content of the response.
  2. Followed by "RETURN False" to specify that the call must be rejected.

Advanced cases

This procedure is run every time an entry point of a REST Webservice description is called. But a REST Webservice can be made of several REST Webservice descriptions. Each one of these descriptions has its own prologue procedure (which can be the same, different or even non-existent).
Example: a Webservice with authentication:
  • "REST_Authentication", a first description without prologue procedure, with entry points to authenticate the user.
    This description can be shared among several projects.
  • A second description with prologue procedure that verifies authentication.
    This description is specific to this REST Webservice.
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment