Skip to content

[12.x] Improve readability of HTTP client response methods by using a table #10481

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

Open
wants to merge 2 commits into
base: 12.x
Choose a base branch
from

Conversation

AhmedAlaa4611
Copy link
Contributor

Description

This PR updates the section on inspecting "HTTP client responses" by converting the current list of available methods into a table format. This improves readability, allows for quicker scanning, and makes it easier for developers to understand the available methods and their return types at a glance.

Benefits

  • More accessible for beginners and quicker for experienced developers to reference.
  • Follows the pattern used in other parts of the documentation for summarizing methods.

http-client.md Outdated
| ------------------------------------------------ | ----------------------------- |
| `$response->body();` | string |
| `$response->json($key = null, $default = null);` | mixed |
| `$response->object();` | object |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be an interesting read in terms of the return type:
laravel/framework#54160

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