package ocsigenserver

  1. Overview
  2. Docs
A full-featured and extensible Web server

Install

dune-project
 Dependency

Authors

Maintainers

Sources

5.0.0.tar.gz
md5=ac7f9fcf1aced530061ceb4c76efe475
sha512=5691d1cc53725466bf0548fdaa8b4b624b9ac20aa41152f61020da05696a2d0e3cd010d9d72aa60d55216ca4b1b3938573e00c7d922e034d1080508ec46b47dd

doc/ocsigenserver/Ocsigen_command/index.html

Module Ocsigen_commandSource

Extending server commands

Sourceexception Unknown_command
Sourceval register_command_function : ?prefix:string -> (string -> string list -> unit Lwt.t) -> unit

Use a prefix for all your commands when you want to create extension-specific commands. For example if the prefix is "myextension" and the commande "blah", the actual command to be written by the user is "myextension:blah". Give as parameter the function that will parse the command and do an action. Its first parameter is the full command as a string. The second one is the command without prefix, split by word. It must raise ocsigen_extensions.Unknown_command if it does not recognize the command.