Idea: Simplify exports of response values (with plugin POC)
See original GitHub issueI found myself quite often repeating exporting variables. Not 'cause they didn’t exists (I used @ref
) but aliasing for a better read. See example:
###
# @name foobars
GET http://localhost:8080/
{{
exports.bars = response.parsedBody.items[0].foo.bars
}}
### with alias
# @ref foobars
GET http://localhost:8080/{{foo}}
### no alias
# @ref foobars
GET http://localhost:8080/anther/{{foobars.items[0].foo.bars}}
To ease this, I wrote this tiny, quick & dirty plugin which adds a new meta data @exports
allowing to do same in a one-liner.
###
# @name foobars
# @exports bars = response.parsedBody.items[0].foo.bars
GET http://localhost:8080/
###
# @ref foobars
GET http://localhost:8080/{{foo}}
Could be extended for multiple variables etc. One downside I see is that feature of @ref
gets missing/unclear
wyt?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Export IntelliJ editor themes as plugins - The JetBrains Blog
Today, I'd like to highlight a small but very useful feature for IDEs based on IntelliJ Platform – exporting editor color schemes as...
Read more >Example Code To Simplify Your Imports and Exports
Example Code To Simplify Your Imports and Exports. These snippets cover the more common cases where custom code is necessary during import. Unique...
Read more >Kong Proof-of-Concept using Minikube - ITNEXT
How to build a proof-of-concept in about 15 minutes. This guide is an update to a previous story of mine. Why another guide?...
Read more >Nik Collection – Help center - DXO support
What is the value compared to Nik Google? ... How can I manually export or import presets / recipes into Nik Collection by...
Read more >Simplification List for SAP S/4HANA 2021 Initial Shipment ...
1.4 The Simplification List SAP S/4HANA release 2021 Initial Shipment, Feature Pack ... 2.8 ABAP Test Framework: Export of ATC Results to 3rd...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Closing…
Yes I agree with you. I’m already noticing how I’m overloading quite a few people at work with the tool. On the other hand I want to be as much as possible a superset between rest-client and Intellij Http Client and for that reason I already have a lot of additional features. For example, why do I have the variables declaration when I can also use Javascript exports. The support of dotenv configuration and additionally support Intellij
*.env.json
. I’ll go and see if I can find suggestions for these problems in other projects, languages.