Package edu.pdx.cs410J.apptbookweb
Class AppointmentBookRestClient
java.lang.Object
edu.pdx.cs410J.apptbookweb.AppointmentBookRestClient
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
ConstructorDescriptionAppointmentBookRestClient
(String hostName, int port) Creates a client to the appointment book 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 word(package private) HttpRequestHelper.Response
postToMyURL
(Map<String, String> dictionaryEntries) void
-
Constructor Details
-
AppointmentBookRestClient
Creates a client to the appointment book REST service running on the given host and port- Parameters:
hostName
- The name of the hostport
- The port
-
AppointmentBookRestClient
-
-
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
-
postToMyURL
- Throws:
IOException
-
removeAllDictionaryEntries
- Throws:
IOException
-