chrome-devtools-java-client icon indicating copy to clipboard operation
chrome-devtools-java-client copied to clipboard

/json/new PUT instead of GET

Open elfoxus opened this issue 2 years ago • 6 comments

Since version 111+ /json/get will not accept GET request, which is used currently by library, which imho disallows the way to open new tab. PUT method should be used.

elfoxus avatar Mar 09 '23 15:03 elfoxus

Even I am facing the same issue

varun85gupta avatar Mar 14 '23 11:03 varun85gupta

same here

vidmantas-banaitis avatar Mar 15 '23 12:03 vidmantas-banaitis

Probably the lib needs to do something like this https://github.com/GoogleChrome/lighthouse/pull/14063/files

varun85gupta avatar Mar 15 '23 18:03 varun85gupta

Had same issue. I should probably create a pull request, but put a fix in fork here:

https://github.com/screamingfrog/chrome-devtools-java-client/commit/53787c6ee2cf6f892b3115e68bc462d2d9d72403

davidcockbill avatar Mar 22 '23 12:03 davidcockbill

a PR already exists

JAndrassy avatar Mar 22 '23 12:03 JAndrassy

@JAndrassy: Thanks saved me some time! It's interesting that the PR blindly changes all requests to PUT. The documentation (https://chromedevtools.github.io/devtools-protocol/) seems to suggest only the /json/new?{url} should use the PUT method. Obviously works though, and makes the code a lot cleaner than my solution!

davidcockbill avatar Mar 22 '23 12:03 davidcockbill