-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Improve the HttpClient panel in the Web Profiler #33311
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
Comments
To improve DX, what if we parse the headers in the response and detect the debug token link to display it. WDYT ? |
@Neirda24 that's indeed a good idea. |
…n the Web Profiler -> Http Client panel (cristagu) This PR was squashed before being merged into the 5.1-dev branch (closes #35391). Discussion ---------- [WebProfilerBundle][HttpClient] Added profiler links in the Web Profiler -> Http Client panel | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | [#33311](#33311) | License | MIT | Doc PR | - As per @Neirda24's idea in this [comment](#33311 (comment)), I parsed the response headers collected by the TraceableHttpClient and created profiler links in the HttpClient Web Profiler panel for all the requests having the 'X-Debug-Token' header.  Commits ------- 70e11f9 [WebProfilerBundle][HttpClient] Added profiler links in the Web Profiler -> Http Client panel
…le (nicolas-grekas) This PR was merged into the 5.1-dev branch. Discussion ---------- [HttpClient] collect the body of responses when possible | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Part of #33311 | License | MIT | Doc PR | - This is missing one thing: the HTML part in the profiler.   Commits ------- 121f728 [HttpClient] collect the body of responses when possible
This PR was merged into the 5.1-dev branch. Discussion ---------- [WebProfiler] Improve HttpClient Panel | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | np <!-- please add some, will be required by reviewers --> | Fixed tickets | #33311 <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | ? Wishlist from issue : - [x] the panel UI could be improved I suppose, e.g. a tooltip on hover in the toolbar - [ ] putting requests in the "Performance" tab would be great (all timings are already in the collected "info") - [ ] ~response bodies are not collected yet~ #33315 (comment) - [ ] when a transport error occurs, (ie the "error" info is populated) we should maybe have a better display too? - [x] add a copy-as-curl button next to each request **[EDIT 07 oct 19]** This PR contains : - Display a tooltip in Toolbar - Add a link only for GET Request in profiler panel  Commits ------- e2e6bd0 [WebProfiler] Improve HttpClient Panel
I could really use that feature now. 🙈 |
Another idea for the profiler: If the API answers in JSON, we could try to parse and pretty-print it. Right now, I receive a string |
Maybe with a two tabs solution ? One RAW and one PARSED. It could be JSON or XML |
Info: since it got the labels |
I hope someone can guide me on implementing this task: The times in the "Performance" tab are measured by calling The |
@michaelKaefer did you get going on this? I'm also interested to learn more, perhaps we can dig together if you want some assistance or sparring of course.. 😎 |
@michaelKaefer , @erickr the StopWatch has already been implemented #38688 |
So I am out here. Current state:
|
Thank you for this issue. |
Not yet, @carsonbot! |
As menstionned here #33311 (comment) guzzle output the request headers (including default headers in configuration). |
Hello devs, any issue here still not solved yet? I'll like to jump in. |
…equest as a cURL command (Deuchnord) This PR was squashed before being merged into the 6.1 branch. Discussion ---------- [HttpClient][WebProfilerBundle] Add button to copy a request as a cURL command | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | #33311 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | Adding a button to each request in the HttpClient section to copy it as a `curl` command that can be then pasted either in the terminal (on Linux and Mac) or in an application that can parse it (like Insomnia). Work in progress: - [x] Make a first PoC of the feature - [x] Generate the `curl` command - [x] Added some UX considerations to the button - [x] Update the tests <!-- Replace this notice by a short README for your feature/bugfix. This will help people understand your PR and can be used as a start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - Never break backward compatibility (see https://symfony.com/bc). - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too.) - Features and deprecations must be submitted against branch 5.x. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry --> Commits ------- 67c9146 [HttpClient][WebProfilerBundle] Add button to copy a request as a cURL command
I think we're done here, no need to keep this issue open. PR welcome of course if you have ideas to improve the panel! |
PR #33015 introduces a profiler panel for the HttpClient component.
It was decided to merge it and improve it in nex iterations.
Here are the ideas that would be great to contribute, help wante:
response bodies are not collected yet[HttpClient] collect the body of responses when possible #35407add a copy-as-curl button next to each request[HttpClient][WebProfilerBundle] Add button to copy a request as a cURL command #43931The text was updated successfully, but these errors were encountered: