Interface PetStoreClient
Typed client view of the petstore pet CRUD surface, consumed via
org.apache.juneau.rest.client.RestClient#remote(Class).
Mirrors the pet endpoints of PetStoreResource (mounted at
/petstore in both the Jetty and Spring Boot deployments). Demonstrates Juneau's REST client consuming
a REST resource written with Juneau's REST server — the client interface and the server resource live in
different modules but share nothing but the wire protocol and the Pet DTO.
See Also:
-
Method Summary
-
Method Details
-
getPets
Lists all pets.- Returns:
- All pets.
-
getPet
Retrieves a pet by ID.- Parameters:
id- The pet ID.- Returns:
- The pet.
-
addPet
Creates a new pet.- Parameters:
pet- The pet to create.- Returns:
- The created pet (with assigned ID).
-