Package edu.pdx.cs410J.airlineweb
Class AirlineRestClient
java.lang.Object
edu.pdx.cs410J.airlineweb.AirlineRestClient
A helper class for accessing the rest client. Note that this class provides
an example of how to make gets and posts to a URL. You'll need to change it
to do something other than just send dictionary entries.
-
Constructor Summary
ConstructorDescriptionAirlineRestClient
(String hostName, int port) Creates a client to the airline REST service running on the given host and port -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDictionaryEntry
(String word, String definition) Returns all dictionary entries from the servergetDefinition
(String word) Returns the definition for the given wordvoid
-
Constructor Details
-
AirlineRestClient
Creates a client to the airline REST service running on the given host and port- Parameters:
hostName
- The name of the hostport
- The port
-
AirlineRestClient
-
-
Method Details
-
getAllDictionaryEntries
Returns all dictionary entries from the server- Throws:
IOException
ParserException
-
getDefinition
Returns the definition for the given word- Throws:
IOException
ParserException
-
addDictionaryEntry
- Throws:
IOException
-
removeAllDictionaryEntries
- Throws:
IOException
-