monolith icon indicating copy to clipboard operation
monolith copied to clipboard

API for monolith

Open karanchawla opened this issue 6 years ago • 2 comments

Is it possible to create an API endpoint where you send the website link to the endpoint and it returns the html page so that you can save this on the server?

For example: [GET] domain.monolith.com/savepage?link=www.targetwebsite.com

If there is interest in this, I would love to contribute.

karanchawla avatar Aug 23 '19 17:08 karanchawla

This could be done relatively easy with any web server, although perhaps monolith could be enhanced to be a Rust crate itself (aside from its CLI interface), letting other Rust programs pull monolithic web pages directly, if needed.

snshn avatar Aug 23 '19 17:08 snshn

@karanchawla

if you read the html of my tool, then you can deconstruct the post request, then you would be able to do something like this: curl -X POST and parse the output.

i could make a real api that outputs json, that wouldnt be too much more work.

here is a link to my tool: https://dweb.tools/pagesaver

cbluth avatar Sep 12 '19 13:09 cbluth