             if res.poll_state_url
               intervals[res.test_id] = setInterval () ->
                 msg.http(res.poll_state_url)
+                  .header('referer', 'https://tools.pingdom.com/')
+                  .header('user-agent', "hubot-pingdom-tools #{pkg.version} (#{pkg.homepage})")
                   .get() (err, res, poll_body) ->
                     if poll_body
                       poll_res = JSON.parse poll_body

#   hubot is <domain> (fast|slow)? - Request a Pingdom pagetest report on <domain>
#   hubot (pagetest|fpt) <domain> - Request a Pingdom pagetest report on <domain>

class PingdomTools

  full_page_test: (msg) ->
    my = this
    fpt_url = 'https://fpt-api.pingdom.com/api/0.1/test?save=false&url='
    fpt_site = msg.match[1]
    msg.http("#{fpt_url}=#{fpt_site}")
      .get() (err, res, body) ->
        if err
          msg.send('Error: ' + err)

# Description:
#   Script for interacting with Pingdom Tools.
#
# Dependencies:
#   none
