protected abstract static class HTTPTask.Request extends HTTPTask
Task
for DELETE, GET, POST, and PUT
operations.
<Request buffer="boolean" charset="String" classname="String" classpathref="Reference" content="String" description="String" fragment="String" host="String" path="String" port="Integer" query="String" scheme="String" taskname="String" uri="String" userinfo="String">
<classpath .../>
<parameter if="String" name="String" unless="String">... text ...</parameter>
<header if="String" name="String" unless="String">... text ...</header>
... text ...
</Request>
HTTPTask.Delete, HTTPTask.Get, HTTPTask.Head, HTTPTask.NameValuePairImpl, HTTPTask.Options, HTTPTask.Patch, HTTPTask.Post, HTTPTask.Put, HTTPTask.Request
description, location, project
Modifier | Constructor and Description |
---|---|
protected |
Request() |
Modifier and Type | Method and Description |
---|---|
void |
addConfiguredHeader(HTTPTask.NameValuePairImpl header) |
void |
addConfiguredParameter(HTTPTask.NameValuePairImpl parameter) |
void |
addText(String text) |
protected void |
configure(HttpUriRequest request)
Method to configure the
HTTPTask HttpUriRequest . |
void |
execute()
Default implementation for
Task subclasses. |
void |
init()
Default implementation for
Task
subclasses. |
protected abstract HttpUriRequest |
request()
Method to construct the
HTTPTask -specific
HttpUriRequest . |
void |
setCharset(String string) |
void |
setFragment(String string) |
void |
setHost(String string) |
void |
setPath(String string) |
void |
setPort(Integer integer) |
void |
setQuery(String string) |
void |
setScheme(String string) |
void |
setURI(String string) |
void |
setUserInfo(String string) |
builder, log, log, log, process, process
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAntTaskName
log, log, log, log, log, log, log, log, log, log, log
createClasspath, delegate, delegate, getClassForName, getClassLoader, setClassname, setClasspathref
configure
protected Request()
public void setURI(String string) throws URISyntaxException
URISyntaxException
public void setCharset(String string)
public void setFragment(String string)
public void setUserInfo(String string)
public void addConfiguredParameter(HTTPTask.NameValuePairImpl parameter)
public void addConfiguredHeader(HTTPTask.NameValuePairImpl header)
public void init() throws BuildException
ClasspathDelegateAntTask
Task
subclasses.init
in interface ClasspathDelegateAntTask
init
in interface ConfigurableAntTask
init
in class HTTPTask
BuildException
protected abstract HttpUriRequest request()
HTTPTask
-specific
HttpUriRequest
.HttpUriRequest
.protected void configure(HttpUriRequest request) throws Exception
request
- The HttpUriRequest
.Exception
- If an exception is encountered.public void execute() throws BuildException
AnnotatedAntTask
Task
subclasses. Check attributes
annotated with AntTaskAttributeConstraint
.
See AnnotatedAntTaskConfigurationChecker
.execute
in interface AnnotatedAntTask
execute
in class HTTPTask
BuildException
- If a
AntTaskAttributeConstraint.Checker
fails.Copyright © 2015–2020 Allen D. Ball. All rights reserved.