@@ -66,17 +66,18 @@ func (im *ImportHTTP) Evaluate(scope *vm.Scope) error {
6666 if err := im .eval .Evaluate (scope , & arguments ); err != nil {
6767 return fmt .Errorf ("decoding configuration: %w" , err )
6868 }
69+ remoteHttpArguments := remote_http.Arguments {
70+ URL : arguments .URL ,
71+ PollFrequency : arguments .PollFrequency ,
72+ PollTimeout : arguments .PollTimeout ,
73+ Method : arguments .Method ,
74+ Headers : arguments .Headers ,
75+ Body : arguments .Body ,
76+ Client : arguments .Client ,
77+ }
6978 if im .managedRemoteHTTP == nil {
7079 var err error
71- im .managedRemoteHTTP , err = remote_http .New (im .managedOpts , remote_http.Arguments {
72- URL : arguments .URL ,
73- PollFrequency : arguments .PollFrequency ,
74- PollTimeout : arguments .PollTimeout ,
75- Method : arguments .Method ,
76- Headers : arguments .Headers ,
77- Body : arguments .Body ,
78- Client : arguments .Client ,
79- })
80+ im .managedRemoteHTTP , err = remote_http .New (im .managedOpts , remoteHttpArguments )
8081 if err != nil {
8182 return fmt .Errorf ("creating http component: %w" , err )
8283 }
@@ -88,7 +89,7 @@ func (im *ImportHTTP) Evaluate(scope *vm.Scope) error {
8889 }
8990
9091 // Update the existing managed component
91- if err := im .managedRemoteHTTP .Update (arguments ); err != nil {
92+ if err := im .managedRemoteHTTP .Update (remoteHttpArguments ); err != nil {
9293 return fmt .Errorf ("updating component: %w" , err )
9394 }
9495 im .arguments = arguments
0 commit comments