benhj / arrow

An interpreted programming language
MIT License
23 stars 3 forks source link

Add a networking API #23

Open benhj opened 4 years ago

benhj commented 4 years ago

Wondering about networking builtins, e.g.:

http_read("http://server/path/something.dat") -> bytes;
benhj commented 4 years ago

http_read itself is complete on the experimental branch and can be used as written above. It uses CURL though and I'm not sure how ideal this is.. The functionality is only built if the CURL headers and libraries can be found by cmake.

Example usage to download a file (for example) would be something like:

http_read("https://slashdot.org") -> file("/Users/bjones/slashdotTest.html");

The 'return type' is an array of bytes. Above, a file receiver is shown to write the returned bytes directly to a file.

benhj commented 4 years ago

Didn't mean to close :-D