I'm trying to connect to Chrome remote debuging with cUrl, however, responses from Chrome return "200 OK" but no data.
I set up chrome using:
chrome.exe --headless --remote-debugging-port=12345
I can successfully get a list of pages with:
>curl -i "http://localhost:12345/json"
HTTP/1.1 200 OK
Content-Length:612
Content-Type:application/json; charset=UTF-8
[ {
"description": "",
"devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:12345/devtools/page/19d24d3a-25b7-4ee8-a5cf-4f3d17778575",
...
"webSocketDebuggerUrl": "ws://localhost:12345/devtools/page/19d24d3a-25b7-4ee8-a5cf-4f3d17778575"
} ]
However, I can only get empty successful response from debugger URLs:
>echo {"id":0,"method":"Page.navigate","params":{"url":"https://stackoverflow.com/"}}|curl -i "http://localhost:12345/devtools/page/19d24d3a-25b7-4ee8-a5cf-4f3d17778575" -H "Content-Type: application/json" -d -
HTTP/1.1 200 OK
Content-Length:0
Content-Type:text/plain
Commands like Page.navigate
and also misformed requests return 200 OK
but nothing is performed.
What I'm I missing???