platformatic
Version:
Platformatic CLI
31 lines (24 loc) • 1.27 kB
Plain Text
Injects a request to the Platformatic runtime service.
``` bash
$ platformatic inject -n runtime-name /hello
-X POST
-H "Content-Type: application/json"
-d '{"key": "value"}'
```
Options:
* `-p, --pid <number>` - The process `id` of the runtime.
* `-n, --name <string>` - The name of the runtime.
* `-s, --service <string>` - The name of the runtime service.
* `-X, --request <string>` - The request HTTP method. Default is `GET`.
* `-H, --header <string>` - The request header. Can be used multiple times.
* `-d, --data <string>` - The request data.
* `-i, --include <boolean>` - Include the response headers in the output. Default is `false`.
* `-v, --verbose <boolean>` - Make the operation more talkative. Default is `false`.
* `-o, --output <file>` - Write the response to the specified file.
The `inject` command sends a request to the runtime service and prints the
response to the standard output. If the `--service` option is not specified the
request is sent to the runtime entry point.
The `inject` command uses the Platformatic Runtime Management API. To enable it
set the `managementApi` option to `true` in the runtime configuration file.
To get the list of runtimes with enabled management API use the
`platformatic ctl ps` command.