Skip to content

Conversation

@Mathious6
Copy link
Owner

This PR introduces a full HAR converter implementation along with significant enhancements to request/response handling, proxy integration, and development environment setup.

  • HAR Converter

    • Added converter package for converting fhttp requests and responses into HAR format.
    • Implemented request (FromHTTPRequest) and response (FromHTTPResponse) conversion functions.
    • Added comprehensive unit tests for both request and response conversions.
    • Introduced HARTime type for strict HAR-compliant timestamp formatting.
    • Added Timings.Total() method for calculating total request/response duration.
  • HAR Handler

    • Added harhandler package to manage HAR sessions, entries, and export.
    • Support for resolving server IP addresses and tracking client proxy used.
    • New Export and AddEntry functions for managing HAR lifecycle.
  • Examples

    • Added example/main.go demonstrating GET/POST requests with query params, cookies, form data, and JSON.
    • Integrated conditional Charles Proxy support (isProxyRunning).
    • HAR export to file (example.har) via harhandler.Export.
  • Devcontainer & Tooling

    • Switched to Microsoft mcr.microsoft.com/devcontainers/go:1.24 base image (ready for 1.25 upgrade).
    • Added .devcontainer/initialize.sh and post-create.sh for certificate setup and CA updates.
    • Managed Zsh plugins via devcontainers-extra/features/zsh-plugins.
    • Added .vscode debug launch config and updated settings to exclude .certs.
  • Other Changes

    • Introduced Version constant in version.go (v1.0.0).
    • Updated README.md with purpose, requirements, and usage notes.
    • Added .gitignore for devcontainer certs, debug binaries, .DS_Store.

New dependencies:

Mathious6 added 30 commits April 9, 2025 21:40
…son to use container image and manage Zsh plugins through features
…dd new request methods for GET and POST with query parameters, form data, and JSON
…scripts, enhance .gitignore for development files, and adjust README for clarity
… proxy for HTTP requests and implement isProxyRunning function to check proxy availability
…r functions for expiration formatting and query/post data extraction
…tegrating entry creation directly into HARHandler methods
…uestHTTPVersion constant and updating request conversion logic
…ing time fields in Page and Entry structures
…agement and updating header processing logic
…nagement and updating header processing logic
…loning and directly using the original request
…ed values with constants and adjusting header assertions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants