org.apache.tools.ant.taskdefs.condition

Class Http

public class Http extends ProjectComponent implements Condition

Condition to wait for a HTTP request to succeed. Its attribute(s) are: url - the URL of the request. errorsBeginAt - number at which errors begin at; default=400.

Since: Ant 1.5

Method Summary
booleaneval()
voidsetErrorsBeginAt(int errorsBeginAt)
Set the errorsBeginAt attribute
voidsetUrl(String url)
Set the url attribute

Method Detail

eval

public boolean eval()

Returns: true if the HTTP request succeeds

Throws: BuildException if an error occurs

setErrorsBeginAt

public void setErrorsBeginAt(int errorsBeginAt)
Set the errorsBeginAt attribute

Parameters: errorsBeginAt number at which errors begin at, default is 400

setUrl

public void setUrl(String url)
Set the url attribute

Parameters: url the url of the request