stream-of-consciousness .har parser in #factor:
"/tmp/a.har" utf8 [ read-jsons ] with-file-reader
first
"log" of
"entries" of
! pick out the stuff you care about here, e.g.: [ "request" of "url" of "/interesting-path" subseq-of? ] filter
"/tmp/a.txt" utf8
[ [ [ "---" print
"request" of
[ [ "method" of ] [ "url" of ] [ "httpVersion" of ] tri "%s %s %s\n" printf ]
[ "headers" of [ [ "name" of ] [ "value" of ] bi "%s: %s\n" printf ] each ]
[ "postData" of [ nl "text" of print ] when* ] tri ]
[ "<<<" print
"response" of
[ [ "status" of ] [ "statusText" of "???" or ] [ "httpVersion" of ] tri "%s %s %s\n" printf ]
[ "headers" of [ [ "name" of ] [ "value" of ] bi "%s: %s\n" printf ] each ]
[ "content" of [ nl "text" of print ] when* ] tri ]
bi ]
each ]
with-file-writer


