The New HTTP Client CLI. By
Вставка
- Опубліковано 9 лют 2025
- Over the past couple of years, we’ve been developing our HTTP Client, which is built into JetBrains IDEs and helps you write and test a variety of requests, from HTTP and gRPC, to GraphQL and WebSocket.
We recently published a new product, called HTTP Client CLI, which makes it possible to run HTTP requests from a terminal or on a continuous integration (CI) server without an IDE.
Join this webinar to learn all about its features, including basic command line options, generating JUnit-compatible test results, and integrating it into the CI server of your choice. We will also take a sneak peek at its roadmap and upcoming features.
Speaker: Marco Behler
Join us:
Website: jb.gg/website
Blog: jb.gg/blog
Twitter: / intellijidea
Facebook: / intellijidea
Download IntelliJ IDEA: jb.gg/download...
Top 15 IntelliJ IDEA shortcuts: jb.gg/Top15Int...
5:55 List of sample endpoints
7:12 Starting a new HTTP file
8:20 GET autocompletion for local endpoints
10:04 Define multiple requests in the same HTTP file
10:40 Naming requests and running them by name
12:22 POST Example with headers
13:34 Define a JSON object for submission
15:56 Utility variables (Random values for testing) {{}}
19:32 Multiple execution environments
22:53 Post-process data from a call response (javascript)
24:04 Included Client object and its attributes
25:06 Declaring a test
27:26 Examine the value of the JSON response object
29:37 Passing data through global variables {{}}
32:00 Pre-processing of data before making an API call
33:30 Included Crypto object and its attributes
35:09 Converting to and from Curl format
37:45 CLI Tool introduction
39:12 Runing CLI (ijhttp) with an input file
50:22 Run HTTP CLI through a Docker image
58:53 Further Reading. Documentation Reference
thnx
Our old pal Marco with his "Hey folks" ;) The best guy I know on youtube!
This was the video I needed! Thank you
In the first 31 mins, you already talked about all the features that a http client needs to have that I can think of.
absolutely amazing tool - already using it a lot!
also congratulations for the demo... very very good... thank you
It's great to have a powerful HTTP client inside IntelliJ so I don't have to keep switching to Insomnia. Love the $random strings!
Marco is an exceptional teacher!
Is there way to see the full list of global variables that's been set with 'client.global.set(...)'? Are they persisted into some file or are they only in memory and are lost after IntelliJ is restarted?
Can we have a stronger integration between HTTP client and spring MVC? Currently, http client does not auto generate json, form parameters and query parameters for the endpoint of the spring MVC controllers. These have been raised in the YouTrack for at least 2 years, but nothing is done. If implemented, can really be powerful
How to make reusable parts? For example user auth requests or js handler utility functions? Will be great to have notation that allow to include one file to others.
Do the requests execute in order? and if a request is awaiting a response, will the request after it be delayed until the response is received?
Any suggestions on how to extract variables from an xml response of a soap request in script
Is it possible to add a method to execute one of the entries?
Is it possible to execute only a single or a subset of tests, e.g. by their name?
Lovely! Postman is obsolete now
@MarcoCodes thank you!
Please tell me how to convert all requests from postman collection to http format?
Could u guys add support for importing openapi files?
Do you have a CLI which runs on a jenkins (hosted on linux ) ?
You can use what I'm showing in this video as your CLI on Linux.
That was cool, but : Why not just write real Junit tests using REST-assured ?
How to get with authentication bearer token ??
Is it possible to integrate these tests with another system (not TeamCity) such as Gitlab CI/CD?
In other words how can I parse the result xml-document with test results to show properly in Gitlab UI?
Yes, you can either simply run CLI there or check if your CI/CD supports JUnit XML format, it is pretty common.
When is WebSocket Client going to be available in IntelliJ? Or maybe it already is?
36:54 ah-ha! It's already supported! Sweet!
Do it support certificate, I saw there is a question asked in the chat during the stream, and the Prod Dev answered with
Good question @Saloed Room about Certs. So what the answer then. It should be a basic need to support certificate.
We need Webstorm Community Edition. !!
Support for RPC calls anytime soon ?
HTTP Client plugin supports gRPC and RSocket (via third-party integration)
Is this available in the Community edition?
No, unfortunately not available in Community editions
Is there any open source plugins similar to this ?
would be nice to write java code instead of javascript
U r probably kidding?!
http files are awesome but CLI needs java :( I'm not going install java on my machine for this till we see a native version of CLI, (write it with c# AOT is better)
23:02 Ewww gross! Who would want to do that? How about kotlin instead?
Worst idea I ever heard, to make people learn a new language like Kotlin to do simple tests on an IDE. This is actually a prime example for using a scripting language, more people know JS so it's the best scripting tool for the job here
@@ThePandaGuitar I don't care what most people do. I want to use kotlin instead of JS. And you don't have to learn the language in order to parse out http responses. All you really need to learn is basic syntax which takes like 10 minutes and IDE's code completion is there to guide you in the right direction
Hi @marcobehler @marcocodes, could you push the issue IDEA-310148 HTTP Client CLI - JDK Version issues?
Yup, already have.
Lack of to/from Base64 functionality is a real pain.
script before the API request is not working, pls reply
< {%
client.request.set("name", client.request.body.raw());
%}
GET {{host}}/demoProject_war_exploded/api/hello-world?name={{name}}