HTTP: Difference between revisions

6 bytes removed ,  5 months ago
m
(→‎{{header|Sidef}}: use "HTTP::Tiny", which is a core module)
m (→‎{{header|Wren}}: Minor tidy)
 
Line 2,817:
{{libheader|libcurl}}
An embedded program so we can ask the C host to communicate with libcurl for us.
<syntaxhighlight lang="ecmascriptwren">/* httpHTTP.wren */
 
var CURLOPT_URL = 10002
Line 2,850:
<br>
We now embed this in the following C program, compile and run it.
<syntaxhighlight lang="c">/* gcc httpHTTP.c -o httpHTTP -lcurl -lwren -lm */
 
#include <stdio.h>
Line 2,960:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "httpHTTP.wren";
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
9,483

edits