Loading TOC...

xdmp.getRequestProtocol

xdmp.getRequestProtocol() as String?

Summary

Returns as a string the request protocol (either "http" or "https")

Returns the empty sequence if it is not called from an HTTP server.

Usage Notes

Use this function if you need to determine whether the client connection is HTTP or HTTPs.

Example

The following example shows logic which checks if the request was submitted via https.

  if (xdmp.getRequestProtocol() == "https") {
  "Submitted via https."; }
  else {
  "Application requires secure connections only.";
  }

Example

xdmp.getRequestProtocol();
=> "https"

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy