public class Http extends ProjectComponent implements Condition
Constructor and Description |
---|
Http() |
Modifier and Type | Method and Description |
---|---|
boolean |
eval()
Is this condition true?
|
void |
setErrorsBeginAt(int errorsBeginAt)
Set the errorsBeginAt attribute
|
void |
setFollowRedirects(boolean f)
Whether redirects sent by the server should be followed,
defaults to true.
|
void |
setRequestMethod(String method)
Sets the method to be used when issuing the HTTP request.
|
void |
setUrl(String url)
Set the url attribute
|
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
public boolean eval() throws BuildException
Condition
eval
in interface Condition
BuildException
- if an error occurspublic void setErrorsBeginAt(int errorsBeginAt)
errorsBeginAt
- number at which errors begin at, default is
400public void setFollowRedirects(boolean f)
public void setRequestMethod(String method)
method
- The HTTP request method to use. Valid values are
the same as those accepted by the
HttpURLConnection.setRequestMetho d() method,
such as "GET", "HEAD", "TRACE", etc. The default
if not specified is "GET".HttpURLConnection.setRequestMethod(java.lang.String)
public void setUrl(String url)
url
- the url of the request