How to set timeout for Scripted API monitor type

Hi Support,

I need to know how to add timeout for Scripted API type monitors’s script.
I used below sample and it is not working.

$http.get('', {timeout: 1500}, function(err) {


Hi, @dhanushka.perumbuli: The $http object is an instance of the Node request module. Looking at the documentation, it appears that you may pass either a URL or an options object to the get() method, but not both. If you want to specify a timeout, you should pass an options object:

  url: '',
  timeout: 1500
1 Like