Skip to content

Add support for psr-7 http client #1818

@kafkiansky

Description

@kafkiansky

Problem Statement

Hi! At thesis, we focus on developing non-blocking drivers and libraries built on fibers. To add support for a non-blocking HTTP client in Sentry, it would be convenient if you had a PSR-7 client implementation for your HttpClientInterface. That way, we could use amphp/http-client-psr7.

Solution Brainstorm

To solve this issue, we can take two approaches:

  1. Since the HTTP client interfaces are internal to the library, we’d need to develop a separate package that requires sentry/sentry as a dependency. In this package, we’d implement PSR-7 support. However, this would require modifying the Request/Response classes by removing the @internal annotation above them.

  2. Add PSR-7 support directly inside your package. This implementation would depend only on PSR-7 contracts, meaning it could accept any standard-compliant HTTP client — not just non-blocking ones.

I can develop both of these solutions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions