Export to HttpClient
Export API definitions as IntelliJ IDEA HttpClient requests.
Usage
Method 1: Right-Click Export
- Open a file containing APIs in your project, or select files/folders in the IDEA project panel
- Right-click on the file content or folder
- Select
ExportHttpClientto export all APIs in the file or folder
Method 2: Shortcut Export
- Open a file containing APIs in your project, or select files/folders in the IDEA project panel
- Use shortcut
Alt + Shift + E(Windows/Linux) orCtrl + E(macOS) - Select the APIs to export, choose
HttpClientas the export channel - Click the ✔ button or press Enter to complete the export
Output
The export generates an .http file containing HttpClient requests for each API endpoint:
http
GET http://localhost:8080/api/users
Content-Type: application/json
###
POST http://localhost:8080/api/users
Content-Type: application/json
{
"name": "test"
}Using Exported Files
- Save the exported
.httpfile to your project - Open the file in IntelliJ IDEA
- Click on the request to execute it directly in IDEA
- Configure the HttpClient test framework for advanced testing