JetClient / jet-client-support

JetClient is an advanced REST API Client plugin for JetBrains IDEs
https://plugins.jetbrains.com/plugin/21173-jetclient
110 stars 0 forks source link

Import postman example not work #103

Closed light-developer closed 3 months ago

light-developer commented 3 months ago

Environment information: OS: Windows IDE version: PhpStorm 2023.2 plugin version: 2024.3.6

Problem: Jet Client: must be have example url = request, and cannot change example url In Posman, we don't need that, because: url can be have ID or dynamic url part

Example: users/123, users/456, file_paths/user/1, file_paths/customer/1

AntonShuvaev commented 3 months ago

The current behavior is intentional. Examples must maintain the same HTTP method and URL (except for the query part) as the parent request. However, you can modify the query parameters and path variable values as needed. In your examples, you should utilize path variables instead of hardcoded values. For instance, use users/{id} and file_paths/{filePath} instead of users/123 and file_paths/user/1, and specify the actual value as a path variable value. While this approach differs from how Postman handles it, I believe this restriction is advantageous. It ensures consistency between the parent request and examples. If you require a completely different URL, it's best to create a separate request.