1

I'm trying to call a http endpoint. For that I need to specify a url that uses a query string to filter data.

Sample URL: http://example.com?date=2017-10-04T22:18.007Z

I need to use the current system time as a value for date query string.

I created a script and assigned the generated url with the current datetime to a variable. However, when I assigned that variable for the url field in the source HTTP definition, it did not resolve the variable.

Is there a way to solve this issue?

user1176058
  • 642
  • 1
  • 8
  • 21

1 Answers1

2

I do this all the time. As long as your script is running properly (you can test that with the test feature on the script), you are writing the URL value to a global variable (something like $URL), and you are writing that global variable out in your target (something like [URL]), it should work.

If you want to show your script (just where you are creating the URL), and your target URL field that could help narrow down the problem.

w3bguy
  • 2,215
  • 1
  • 19
  • 34