Skip to content

HttpClient panel in the Web Profiler not displaying all request headers #43348

Closed
@ankahla

Description

@ankahla

Symfony version(s) affected: 5.3.2

Description
As menstionned here #33311 (comment) guzzle output the request headers (including default headers in configuration).
Unfortunatly even with this PR #35407 we still not collecting all headers : headers defined in configuration are missing!

How to reproduce

#config/packages/framework.yaml
http_client:
        default_options:
            headers:
                Accept: application/json
                User-Agent: "app_web"
        scoped_clients:
            http.client.api:
                base_uri: '%api_uri%'
                headers:
                    CustomHeader: "%api_host%"

Possible Solution
Exposing $defaultHeaders attribute and get it from HttpClientTrait directly as an attribute.

Additional context
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions