Constructor and Description |
---|
SimpleRequest(URI serverURI)
Setup a SimpleRequest initiator against serverURI
|
Modifier and Type | Method and Description |
---|---|
Properties |
getProperties(String relativePath)
Initiate a simple GET request on the path specified, returning the response contents as a
Properties
object. |
String |
getString(String relativePath)
Initiate a simple GET request on the path specified.
|
public SimpleRequest(URI serverURI)
serverURI
- the server URI to base all requests off ofpublic String getString(String relativePath) throws IOException
relativePath
- the relative path of the serverURI to resource for this GET requestIOException
- if unable to communicate with serverpublic Properties getProperties(String relativePath) throws 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.IOException
- if unable to communicate with serverCopyright © 1995–2017 Mort Bay Consulting. All rights reserved.