curlconverter icon indicating copy to clipboard operation
curlconverter copied to clipboard

Integrate curlconverter with webdriver

Open johndharrison opened this issue 8 years ago • 2 comments

Hi Bob,

It would be great to integrate curlconverter with phantomjs. Phantomjs running webdriver allows you to export HAR files. V8 should be able to run https://github.com/mattcg/har-to-curl ,

  • The workflow would be run through your steps with webdriver
  • The HAR files are recorded
  • HAR is converted to curl
  • curl is converted to httr
  • You can then use the generated httr calls in future

johndharrison avatar Oct 12 '16 04:10 johndharrison

That is a brilliant idea! I had been thinking abt adding support for HAR files in general but this is a way better approach. It's definitely on the TODO list now!

hrbrmstr avatar Oct 12 '16 10:10 hrbrmstr

I had a look at phantomjs and the HAR logs it exports. Unfortunately there is an issue with the cookies (they are absent in the HAR logs) so the utility of the logs are reduced. https://github.com/detro/ghostdriver/issues/366

I added the option to import a HAR log via file/url/string. It might be useful to allow filtering of the entries based on response content-type? Perhaps a grouping based on mime type/ internet media type http://www.freeformatter.com/mime-types-list.html

johndharrison avatar Oct 20 '16 12:10 johndharrison