DOKK / manpages / debian 12 / libweb-mrest-cli-perl / Web::MREST::CLI.3pm.en
Web::MREST::CLI(3pm) User Contributed Perl Documentation Web::MREST::CLI(3pm)

Web::MREST::CLI - CLI components for Web::MEST-based applications

Version 0.284

Top-level module of the Web::MREST::CLI distribution. Exports some "generalized" functions that are used internally and might also be useful for writing CLI clients in general.

Once you have run the CLI client executable ("mrest-cli") and assuming it is pointing correctly to a running MREST-compatible server, you can begin to explore the REST API by issuing the command:

    get /

If the server is running at "http://localhost:5000", the same information can by obtained by pointing a web browser to that URI.

This will produce a list of top-level resources. To view documentation on a resource called "foo", issue the following command:

    post docu pod foo

The documentation should include information on which HTTP methods can be used to access the resource.

To view documentation on the "docu/pod" resource itself:

    post docu pod docu/pod

Takes PARAMHASH containing possible parameters "distro", "sitedir", and "debug_mode". Initializes CLI client and returns a status object.

The "distro" string should use hyphens instead of double-colons, i.e. "Foo-Bar" instead of "Foo::Bar".

Given a filename (path) which might be relative or absolute, return an absolute version. If the path was relative, it will be anchored to the home directory of the user we are running as.

Initialize the LWP::UserAgent singleton object.

Return the cookie_jar associated with our user agent.

Send a request to the server, get the response, convert it from JSON, and return it to caller. Die on unexpected errors.

2022-10-14 perl v5.34.0