-
-
Notifications
You must be signed in to change notification settings - Fork 5
Custom request URL
Ahmad K. Bawaneh edited this page Dec 28, 2019
·
2 revisions
In some cases like when we work with HATEOAS links the request url isnt fixed and is received from the response of another rest request, and so using service root or Path mapping does not work,
in this case we can leave the value for @Path
annotation empty and use the request setUrl
method to set the url, this method will override any other path setup.
Example
MoviesServiceFactory.INSTANCE
.updateMovie(movie)
.setUrl("http://localhost:6060/movies")
.onSuccess(aVoid -> {
//do something on success
})
.onFailed(failedResponse -> {
//do something on error
})
.send();
- 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