lib/webpagetest/response.rb
# Makes the request to get the test result
Makes the request to get the test result
Makes the request to get the test result
def fetch_result
      connection = @client.connection
      response = connection.get do |req|
        req.url RESULT_BASE
        req.params['test'] = test_id
        req.params['pagespeed'] = 1
      end
      response_body = HashieResponse.new(JSON.parse(response.body))
      response_body.data.status_code = response_body.statusCode
      response_body.data.status_text = response_body.statusText
      @result = response_body.data
    end
def fetch_result connection = @client . connection response = connection . get do | req | req . url RESULT_BASE req . params [ 'test' ] = test_id req . params [ 'pagespeed' ] = 1 end response_body = HashieResponse . new ( JSON . parse ( response . body ) ) response_body . data . status_code = response_body . statusCode response_body . data . status_text = response_body . statusText @result = response_body . data end
Makes the request to get the test result
Makes the request to get the test result