-
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
[Feature Request] Import/Export using HAR file format #101
Comments
👋 I was going to take a crack at the export feature. I've got the UI wired up (I just used the JSONExporterControlPanel and JSONExporter as a starting point since a HAR file is just a big JSON dict.) Here's a barebones sample of a HAR file where I think I've more or less removed all of the optional fields according to the spec. (added How would you recommend going about creating the custom JSON dict that is required by the HAR Format? |
Thanks for looking into this @latacora-tomekr! However as the gsonProvider used by the JSONExporter class has a serializer defined for the LogEntry class already, you might be best building a new Gson instance and registering the custom serializer within the HAR exporter class using something like: Then you could iterate over each entry to be exported and add them to your har export object. Again, thank you very much for looking into this! :) |
I see, so I created a HarSerializer in the form of:
However, I think a LogEntry represents one possible request. So in the context of the HAR format, this serializer logic would just serialize one object in the |
Apologies, indeed you are correct in saying that LogEntry represents a single request. My previous comment probably wasn't the best method of doing this. Instead, a
|
Feature description:
HAR file format is a de-facto standard for saving HTTP requests/responses and is supported by multiple tools including Google Chrome and Firefox developer tools.
Supporting this format would allow integration with multiple tools.
The text was updated successfully, but these errors were encountered: