From 8bd1dadbfad220b87fa15db60b745ce30a13ce28 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Thu, 20 Jun 2024 13:18:38 +0900 Subject: [PATCH] Created Invoke Method (markdown) --- Invoke-Method.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Invoke-Method.md diff --git a/Invoke-Method.md b/Invoke-Method.md new file mode 100644 index 0000000..3784fc2 --- /dev/null +++ b/Invoke-Method.md @@ -0,0 +1,33 @@ +# Invoke Method + +The Invoke Method feature has been supported since Caterpillar Proxy version 0.1.5.17. This feature allows you to remotely call functions defined on the server. + +First, create a request in JSON format as shown below. Save it as a file named phpversion.json. + +```json +{ + "jsonrpc": "2.0", + "method": "relay_invoke_method", + "params": { + "callback": "phpversion", + "args": [] + }, + "id": "" +} +``` + +Next, use curl to perform a test to call the server's function remotely. + +```sh +curl -X POST --data "@phpversion.json" -H "Content-Type: application/json" -H "User-Agent: php-httpproxy/curl" http://YOUR_HOSTNAME/ +``` + +You should see the phpversion output as shown below. + +```json +{"jsonrpc":"2.0","result":{"status":200,"data":"8.2.18"},"id":""} +``` + +## Report abuse +* ActivityPub [@gnh1201@catswords.social](https://catswords.social/@gnh1201) +* abuse@catswords.net \ No newline at end of file