Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

However, there might be times when the production database wants to avoid the Enable setting but the API developer needs to use the visual Debugger. For reasons like this, the HTTP Framework Setup form provides the same options as the Database Manager but this setting will only affect those engines handling HTTP requests:

Triggering the Debugger

As previously noted, a developer can simply embed a debug statement in the API code but this would affect all requests. So there needs to be a way to safely trigger the debugger. In traditional OpenInsight development, developers could check for unique conditions such as the values in the @USERNAME or @STATION system variables. All HTTP requests, however, will always be handled by the same username and station.

One way to add back the ability to check for special values is to put parameters in the API call. API testing tools like Postman make it very easy to add a custom parameter. We recommend updating the AdditionalValues string from the OECGI4 registry key to include HTTP_DEBUG. Doing so will tell the OECGI to pass through a Request Header with the name Debug. You could, of course, create any name you want.

The HTTP_MCP controller routine already has code that checks for a value assigned to the Debug request header:

Code Block
languagebp
// Engage the debugger if requested.
If HTTP_Services('GetRequestHeaderField', 'Debug') then Debug