IntelliJ HTTP Client: Re-using Javascript In Pre-Request And Response Handlers
When we use the IntelliJ HTTP Client we can write Javascript for the pre-request and response handlers. The Javascript code must be in between {% … %}
delimeters. If we want to re-use Javascript functions in the pre-request or response handlers we can store them in an external Javascript file. Then we use the import
statement to import either the whole file or specify explicitly the code we want to import. This way we can reuse code for different pre-request and response handlers.