I use curl all the time at the command line, to request an url and parse it's markup.
I do this easily for authenticated pages by going in Chrome, loading the url, and then opening the inspector, finding the url at the top of the Network history, right clicking it, and choose Copy | Copy as Curl
I'd like to do the same with a single page application, that of course runs tons of other things to render itself, like javascript, or whatever.
Are there any tools out there that will let me easily change the "curl" to something else, and it will download the generated source of the page?
e.g. Normally I'd run this to get the source of the authenticated page if it wasn't a single page application (copied from Chrome)
curl 'https://mywebsite.com/singlePageApplication' \
-H 'Connection: keep-alive' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'Accept-Language: en,en-US;q=0.9' \
-H 'Cookie: session=XXX"
I'd like to be able to just switch that to something else, and it take in all the headers and preferably, exactly the same syntax as curl, and give me the generated source.
downloadGeneratedSource 'https://mywebsite.com/singlePageApplication' \
-H 'Connection: keep-alive' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'Accept-Language: en,en-US;q=0.9' \
-H 'Cookie: session=XXX"
Does this exist anywhere?