Package VASSAL.tools
Class HTTPPostBuilder
java.lang.Object
VASSAL.tools.HTTPPostBuilder
Deprecated, for removal: This API element is subject to removal in a future version.
Builds HTTP POST requests conveniently.
- Since:
- 3.1.0
- Author:
- Joel Uckelman
-
Constructor Summary
ConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Submits an HTTP POST request to the given URL.Deprecated, for removal: This API element is subject to removal in a future version.Submits an HTTP POST request to the given URL.void
setParameter
(String name, File file) Deprecated, for removal: This API element is subject to removal in a future version.Sets a file to be uploaded as part of an HTTP POST request.void
setParameter
(String name, String value) Deprecated, for removal: This API element is subject to removal in a future version.Sets a parameter for an HTTP POST request.void
setParameter
(String name, String filename, InputStream in) Deprecated, for removal: This API element is subject to removal in a future version.Sets a file to be uploaded as part of an HTTP POST request.void
setParameter
(String name, String filename, String contents) Deprecated, for removal: This API element is subject to removal in a future version.Sets a file to be uploaded as part of an HTTP POST request.
-
Constructor Details
-
HTTPPostBuilder
public HTTPPostBuilder()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
setParameter
Deprecated, for removal: This API element is subject to removal in a future version.Sets a parameter for an HTTP POST request.- Parameters:
name
- the name of the parametervalue
- the value of the parameter- Throws:
IOException
- in case of failure
-
setParameter
Deprecated, for removal: This API element is subject to removal in a future version.Sets a file to be uploaded as part of an HTTP POST request.- Parameters:
name
- the name of the parameterfile
- the path to the file- Throws:
IOException
- in case of failure
-
setParameter
Deprecated, for removal: This API element is subject to removal in a future version.Sets a file to be uploaded as part of an HTTP POST request.- Parameters:
name
- the name of the parameterfilename
- the path to the filein
- anInputStream
from which to read the file- Throws:
IOException
- in case of failure
-
setParameter
Deprecated, for removal: This API element is subject to removal in a future version.Sets a file to be uploaded as part of an HTTP POST request.- Parameters:
name
- the name of the parameterfilename
- the path to the filecontents
- aString
containing the file- Throws:
IOException
- in case of failure
-
post
Deprecated, for removal: This API element is subject to removal in a future version.Submits an HTTP POST request to the given URL. This convenience method is equivalent toHTTPPostBuilder.post(new URL(url))
.- Parameters:
url
- the URL to receive the POST request- Returns:
- the reply
- Throws:
IOException
- in case of failure
-
post
Deprecated, for removal: This API element is subject to removal in a future version.Submits an HTTP POST request to the given URL.- Parameters:
url
- the URL to receive the POST request- Returns:
- the reply
- Throws:
IOException
- in case of failure
-
BugUtils
for an example.