passbe/beef-migration-test-2 — Issue #290: Add beefjs API Function: Request Timeout
Author: passbe
Created: 2011-12-05 10:07:26+00:00
State: open

Add a function to test if the request takes longer than the time_out param. Return false if the response takes longer then the time_out param. True if it doesn't time out.

/**
* @params: {String} url: target url which is loaded in the iframe.
* @params: {String} method: whether to use a GET or POST HTTP method.
* @params: {Hash} params: list of params that will be sent in request.
* @params: {Integer} time_out: test if the response takes longer than time_out.
*/

request_timeout(url, method=post, param=hash, time_out)

Original link: http://code.google.com/p/beef/issues/detail?id=152