Skip to content

feat: aiohttp client support in HttpPlugin #6

@elijahr

Description

@elijahr

Summary

Extend HttpPlugin to intercept aiohttp.ClientSession requests in addition to the existing httpx, requests, and urllib transports.

Motivation

aiohttp is one of the most popular async HTTP clients in the Python ecosystem. The README currently notes that aiohttp is not supported. Adding it closes the last major gap in HTTP client coverage.

Proposed Design

  • Add aiohttp transport interception alongside existing httpx/requests/urllib
  • Same interaction recording format (method, url, request_headers, request_body, status, response_headers, response_body)
  • Same assert_request() / assert_response() chaining pattern
  • Optional dependency: bigfoot[aiohttp] extra
  • Could be implemented as an enhancement to existing HttpPlugin rather than a separate plugin

Acceptance Criteria

  • aiohttp.ClientSession.request (and shorthand methods) intercepted
  • Same 7-field interaction model as existing HTTP transports
  • bigfoot[aiohttp] optional extra
  • Guide updated with aiohttp examples
  • Tests covering async aiohttp usage

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions