![]() | Fun 0.41.5 The programming language that makes You have fun |
Fun VM opcode snippet: HTTP GET via libcurl (OP_CURL_GET). More...
Go to the source code of this file.
Functions | |
| free_value (v) | |
| push_value (vm, make_string("")) | |
Variables | |
| case | OP_CURL_GET |
| break | |
Fun VM opcode snippet: HTTP GET via libcurl (OP_CURL_GET).
This snippet is included by vm.c and implements the OP_CURL_GET instruction. When FUN_WITH_CURL is enabled, it performs an HTTP GET request for the provided URL and pushes the response body as a string. If libcurl support is not built in, or an error occurs, an empty string is pushed instead.
Stack behavior:
Converts the top stack value to a URL string, issues a GET request using libcurl, and pushes the response body as a string. When compiled without FUN_WITH_CURL, the opcode becomes a no-op that consumes one value and pushes an empty string.
Error handling:
Notes:
Definition in file get.c.
| free_value | ( | v | ) |
| push_value | ( | vm | , |
| make_string("") | ) |