PhpStorm 2021.3 EAP build #7 is now available! To catch up on all the new features coming to PhpStorm 2021.3, check out our previous EAP blog posts.
In this blog post, you can read about enhancements for the HTTP client in the upcoming release.
HTTP client enhancements
In this release cycle we have significantly improved the built-in HTTP client. We added support for output redirection to a custom file or directory, support for text and JSON streams, support for HTTP request identifiers, and support for binary responses. Let’s take a more detailed look at these new features.
Support for text streams and JSON streams in the HTTP Client
It is now easier to test streaming applications in your favorite IDE because the upcoming v2021.3 supports the following content types: text/event-stream, application/stream+json, and application/x-ndjson. This means the HTTP client will no longer wait for a stream to end and will instead display the output on the fly.
The HTTP client will also listen for the end of a stream and will show a message when the process is finished.
Binary responses in the HTTP client
In the upcoming PhpStorm 2021.3, the HTTP client shows an image preview in the response console if a response is an image.
The HTTP client does not show a preview for a response if it isn’t clear whether it is a text response.
Output redirection to custom file or directory
The HTTP client can now redirect output to a custom file or directory. It supports two operators for force and soft redirects:
- The >> operator always creates a new file, adding an -n suffix to a file name if the requested file name already exists.
- The >>! operator rewrites the file if it already exists.
Support for HTTP request identifiers
The upcoming PhpStorm 2021.3 now understands identifiers (or names) for requests. The IDE understands identifiers both that were declared as a comment with @name and that were declared as text in the first separator (###).
You can invoke a request by its identifier from the Services tool window or from the Run Configuration, Run Anything, or Search Everywhere dialogs.
The full list of changes in this build is available in the release notes.
- Important! PhpStorm EAP builds are not fully tested and may be unstable.
- You can install an EAP build side by side with a stable PhpStorm version to try out the latest features.
- EAP builds are free to use but expire 30 days after the build date.
Please report any problems you find to our issue tracker or comment on this post!
Your JetBrains PhpStorm team
The Drive to Develop