public class SimpleRequest
extends java.lang.Object
It is not meant to be robust or even configurable.
Do not use this for large responses, as the entire response body is always assumed to fit in a single String
object.
| Constructor and Description |
|---|
SimpleRequest(java.net.URI serverURI)
Setup a SimpleRequest initiator against serverURI
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Properties |
getProperties(java.lang.String relativePath)
Initiate a simple GET request on the path specified, returning the response contents as a
Properties
object. |
java.lang.String |
getString(java.lang.String relativePath)
Initiate a simple GET request on the path specified.
|
public SimpleRequest(java.net.URI serverURI)
serverURI - the server URI to base all requests off ofpublic java.lang.String getString(java.lang.String relativePath)
throws java.io.IOException
relativePath - the relative path of the serverURI to resource for this GET requestjava.io.IOException - if unable to communicate with serverpublic java.util.Properties getProperties(java.lang.String relativePath)
throws java.io.IOException
Properties
object.
This expects that the GET response will be in the form of a Properties text file, in a format that is suitable
for Properties.load(InputStream) use.
relativePath - the relative path of the serverURI to resource for this GET requestProperties object.java.io.IOException - if unable to communicate with serverCopyright © 1995–2019 Mort Bay Consulting. All rights reserved.