172 posts
Location
USA
Posted 01 September 2016 - 01:05 AM
net - A Simple Version of the HTTP APIEver think the HTTP API is so hard to use? So much commands to type, so much things to do. I thought of that and made a simple API called net. Net will download files using the HTTP API. For you it is like an easy version of the HTTP API.
This can be used to download raw filesDownload
To download net just type in:
pastebin get Tfe71LAz netLoading the API
To load the API into your program then at the start of your program type:
os.loadAPI("net")
You have to have the net API downloaded to do thisUsage
Usage:
net.download(URL, Path)
net will return true or false depending if the download completed sucessfully and will save the file to the path and file nameExample
So say you wanted to download google.com
So you would have to load the API then type:
net.download("https://www.google.com", "/google")
that will save the file to /google because we told it to save it to /googleEveryone is allowed to use my API. Credit would be appreciated but it completely optional.
Thank You!
Edited on 11 September 2016 - 07:25 PM
40 posts
Location
Inside a Linux server, waiting to EXPLODE
Posted 01 September 2016 - 01:32 AM
Nice API :)/>
172 posts
Location
USA
Posted 01 September 2016 - 01:34 AM
Thank You!
756 posts
Posted 01 September 2016 - 03:41 AM
And how do you get the content of a page if this only returns true or false?
172 posts
Location
USA
Posted 01 September 2016 - 12:48 PM
It saves it to a file
So say if i wanted to download google.com so i will load the API and then type:
net.download("
https://www.google.com", "/google")
it would return true and save the file to google in the / directory
756 posts
Posted 01 September 2016 - 03:27 PM
…… You're right, I must've been really tired when I posted that :P/>
91 posts
Posted 01 September 2016 - 03:45 PM
Can I put the function from this API as en embed into my program?
I am writing a simple program manager to use with custom servers
172 posts
Location
USA
Posted 01 September 2016 - 11:49 PM
Sure. You can use my API in your program
726 posts
Location
Rem is best girl
Posted 02 September 2016 - 12:59 PM
Im making a moreclean useful version of dis :^)