diff --git a/readme.md b/readme.md index dd78ef11..cdd948c7 100644 --- a/readme.md +++ b/readme.md @@ -315,7 +315,7 @@ As of version 0.11 Spring HATEOAS provides an API for client side service traver Map parameters = new HashMap<>(); parameters.put("user", 27); -Traverson traverson = new Traverson("http://localhost:8080/api/", MediaTypes.HAL_JSON); +Traverson traverson = new Traverson(new URI("http://localhost:8080/api/"), MediaTypes.HAL_JSON); String name = traverson.follow("movies", "movie", "actor"). withTemplateParameters(parameters). toObject("$.name"); @@ -323,4 +323,4 @@ String name = traverson.follow("movies", "movie", "actor"). You set up a `Traverson` instance by pointing it to a REST server and configure the media types you want to set as `Accept` header. You then go ahead and define the relation names you want to discover and follow. relation names can either be simple names or JSONPath expressions (starting with an `$`). -The sample then hands a parameter map into the execution. The parameters will be used to expand URIs found during the traversal that are templated. The traversal is concluded by accessing the representation of the final traversal. In the case of the sample we evaluate a JSONPath expression to access the actor's name. \ No newline at end of file +The sample then hands a parameter map into the execution. The parameters will be used to expand URIs found during the traversal that are templated. The traversal is concluded by accessing the representation of the final traversal. In the case of the sample we evaluate a JSONPath expression to access the actor's name.