-
-
Notifications
You must be signed in to change notification settings - Fork 5
Query parameters
Ahmad K. Bawaneh edited this page Dec 28, 2019
·
2 revisions
if a service method argument is annotated with @QueryParam
then will be automatically added to the request path as a query parameter.
Sample:
if we have the following service definition
@RequestFactory
public interface MoviesService {
@Path("library/movies")
@GET
Movie getMovieByName(@QueryParam("name") String movieName);
}
then when we make the following request
MoviesServiceFactory.INSTANCE
.getMovieByName("hulk")
.onSuccess(movie ->{})
.send();
then the request made to the server will have the following path
http://localhost:8080/service/library/movies?name=hulk
- Home
- Quick start
- Sharing clients
-
Configuration
- Locating resource classes
- Service root
- Resource root
- Http methods
- Service method path mapping
- Service path
- Query parameters
- Path parameters
- Header parameters
- Date format
- Request body
- Request and Response mapping
- Produces and Consumes
- Success codes
- Timeout and maximum retries
- With credentials
- Custom request URL
- Global interceptors
- Default failed response handler
- Interface inheritance
- Multipart form data