Skip to content

[Web service] invoke app command

Houzuo Guo edited this page Oct 14, 2020 · 2 revisions

Introduction

Hosted by laitos web server, the form offers a text field to submit app commands and displays the response.

Configuration

  1. Under JSON key HTTPHandlers, write a string property called CommandFormEndpoint, value being the URL location that will serve the form. Keep the location a secret to yourself and make it difficult to guess.
  2. Follow command processor to construct configuration for JSON key HTTPFilters.

Here is an example:

{
    ...

    "HTTPHandlers": {
        ...

        "CommandFormEndpoint": "/very-secret-invoke-app-command",

        ...
    },

    ...
}

Run

The form is hosted by web server, therefore remember to run web server.

Usage

In a web browser, navigate to CommandFormEndpoint of laitos web server.

Enter password and app command into the text box, click "Exec" button and observe the app response.

Tips

  • Make the URL location secure and hard to guess, it helps to secure this web service beyond password protection!
Clone this wiki locally