public class Http extends ProjectComponent implements Condition
description, location, project
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(java.lang.String method)
Sets the method to be used when issuing the HTTP request.
|
void |
setUrl(java.lang.String url)
Set the url attribute
|
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
public void setUrl(java.lang.String url)
url
- the url of the requestpublic void setErrorsBeginAt(int errorsBeginAt)
errorsBeginAt
- number at which errors begin at, default is
400public void setRequestMethod(java.lang.String method)
method
- The HTTP request method to use. Valid values are
the same as those accepted by the
HttpURLConnection.setRequestMethod() method,
such as "GET", "HEAD", "TRACE", etc. The default
if not specified is "GET".HttpURLConnection.setRequestMethod(java.lang.String)
public void setFollowRedirects(boolean f)
f
- booleanpublic boolean eval() throws BuildException
Condition
eval
in interface Condition
BuildException
- if an error occurs