-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to export as HAR File #114
Conversation
Also had the VS Code formatter fix the file and couldn't undo the changes.
Thank you for this PR, I've just had a quick glance over the code and it looks perfect! |
Ah I may have found an issue. The spec says:
I believe the default encoder uses unicode. Here is a sample of a multipart file upload parameter:
|
👋 Checking back in on this to see if you have a recommended way to switch to UTF-8 |
Thanks for the poke on this, I've had a look and it seems to me that it is already formatting the files as UTF-8 as far as I can see. If you're Other than that, just one small issue with imported entries having a null request time cannot be exported but I've fixed that 😄 If you can confirm that the files are indeed UTF-8 encoded on your end I'll go ahead and merge this 👍 |
oh yep, good call! Yea looks good to me then! |
This PR adds the export feautre of #101 according to the HAR file spec.
efbe707 Creates a HARExporter and serializer that gets added to the current list of exporters.
3895efb and e85db02 are required additions to support the new fields of the HAR file.
85a3f4a The auto formatter in VS Code ran on a few files
The HARSerializer's
write
function is one large function which for the most part mapsLogEntry
fields to the HAR file format's JSON fields. As a result, this function is pretty big. If you'd prefer that get split up in any way, let me know and I can make the changes.A sample HAR file generated by the exporter can be found here: LoggerPlusPlus.har.txt
Note, this only implements export, import is left as a TODO