As already documented above, this is the Controller (aka Listener) that the OECGI immediately calls when it receives an HTTP request. It is a replacement to
RUN_OECGI_REQUEST but it is designed primarily to manage REST APIs.
HTTP_MCP is a relatively small routine which fits into the SRP philosophy that controllers should be as thin as possible. The basic workflow of
HTTP_MCP is as follows:
- Call HTTP_Services so the HTTP request information is parsed and saved in memory for easy retrieval by API logic.
- Call HTTP_Services to log the HTTP request.
- Call HTTP_Authentication_Services to validate access to the API server.
- Call the API handler for the endpoint (if authorized to do so).
- Call HTTP_Services to get the HTTP response in a proper format that OECGI will accept.
- Call HTTP_Services to log the HTTP response.
- Call HTTP_Services and HTTP_Authentication_Services to perform various clean-up and clearing processes to prevent future HTTP requests handled by the same OpenEngine from using stale or unauthorized data.
- Return the HTTP response to the OECGI.