File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
plugins/template-function-response/src Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,10 @@ export const plugin: PluginDefinition = {
7272 name : 'header' ,
7373 label : 'Header Name' ,
7474 async dynamic ( ctx , args ) {
75+ // Dynamic form config also runs during send-time rendering.
76+ // Keep this preview-only to avoid side-effect request sends.
77+ if ( args . purpose !== 'preview' ) return null ;
78+
7579 const response = await getResponse ( ctx , {
7680 requestId : String ( args . values . request || '' ) ,
7781 purpose : args . purpose ,
@@ -146,6 +150,10 @@ export const plugin: PluginDefinition = {
146150 label : 'JSONPath or XPath' ,
147151 placeholder : '$.books[0].id or /books[0]/id' ,
148152 dynamic : async ( ctx , args ) => {
153+ // Dynamic form config also runs during send-time rendering.
154+ // Keep this preview-only to avoid side-effect request sends.
155+ if ( args . purpose !== 'preview' ) return null ;
156+
149157 const resp = await getResponse ( ctx , {
150158 requestId : String ( args . values . request || '' ) ,
151159 purpose : 'preview' ,
You can’t perform that action at this time.
0 commit comments