Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a networking API #23

Open
benhj opened this issue Mar 2, 2020 · 2 comments
Open

Add a networking API #23

benhj opened this issue Mar 2, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@benhj
Copy link
Owner

benhj commented Mar 2, 2020

Wondering about networking builtins, e.g.:

http_read("http://server/path/something.dat") -> bytes;
@benhj
Copy link
Owner Author

benhj commented Mar 2, 2020

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 benhj closed this as completed Mar 2, 2020
@benhj benhj reopened this Mar 2, 2020
@benhj
Copy link
Owner Author

benhj commented Mar 2, 2020

Didn't mean to close :-D

@benhj benhj self-assigned this Mar 2, 2020
@benhj benhj added the enhancement New feature or request label Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant