hrbrmstr / curlconverter

:curly_loop: :arrow_right: :heavy_minus_sign: Translate cURL command lines into parameters for use with httr or actual httr calls (R)
http://rud.is/b/2016/02/10/craft-httr-calls-cleverly-with-curlconverter/
Other
91 stars 12 forks source link

Integrate curlconverter with webdriver #9

Open johndharrison opened 8 years ago

johndharrison commented 8 years ago

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 ,

hrbrmstr commented 8 years ago

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!

johndharrison commented 8 years ago

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