![]() | Fun 0.41.5 The programming language that makes You have fun |
Fun VM opcode snippet: HTTP POST via libcurl (OP_CURL_POST). More...
Go to the source code of this file.
Functions | |
| free_value (a) | |
| free_value (b) | |
| push_value (vm, make_string("")) | |
Variables | |
| case | OP_CURL_POST |
| Value | b = pop_value(vm) |
| break | |
Fun VM opcode snippet: HTTP POST via libcurl (OP_CURL_POST).
This snippet is included by vm.c and implements the OP_CURL_POST instruction. When FUN_WITH_CURL is enabled, it performs an HTTP POST to the given URL with the provided request body 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:
Pops the POST body and URL, performs an HTTP POST, and pushes the response as a string. Without FUN_WITH_CURL, consumes two values and pushes an empty string.
Error handling:
Notes:
Definition in file post.c.
| free_value | ( | a | ) |
| free_value | ( | b | ) |
| push_value | ( | vm | , |
| make_string("") | ) |