# Module selenium-webdriver/http/util

code »

Various HTTP utilities.

Show:PublicProtectedPrivate

## Functions

code » getStatus ( url ) ⇒ `!webdriver.promise.Promise`

Queries a WebDriver server for its current status.

Parameters

url: `string`
  Base URL of the server to query.

Returns

A promise that resolves with a hash of the server status.

code » waitForServer ( url, timeout ) ⇒ `!webdriver.promise.Promise`

Waits for a WebDriver server to be healthy and accepting requests.

Parameters

url: `string`
  Base URL of the server to query.
timeout: `number`
  How long to wait for the server.

Returns

A promise that will resolve when the server is ready.

code » waitForUrl ( url, timeout ) ⇒ `!webdriver.promise.Promise`

Polls a URL with GET requests until it returns a 2xx response or the timeout expires.

Parameters

url: `string`
  The URL to poll.
timeout: `number`
  How long to wait, in milliseconds.

Returns

A promise that will resolve when the URL responds with 2xx.