Package org.springframework.web.client
Interface ApiVersionInserter
- All Known Implementing Classes:
DefaultApiVersionInserter
public interface ApiVersionInserter
Contract to determine how to insert an API version into the URI or headers
of a request.
- Since:
- 7.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptiondefault URI
insertVersion
(Object version, URI uri) Insert the version into the URI.default void
insertVersion
(Object version, HttpHeaders headers) Insert the version into the request headers.
-
Method Details
-
insertVersion
Insert the version into the URI.The default implementation returns the supplied URI unmodified.
- Parameters:
version
- the version to inserturi
- the URI for the request- Returns:
- the updated URI, or the original URI unmodified
-
insertVersion
Insert the version into the request headers.The default implementation does not modify the supplied headers.
- Parameters:
version
- the version to insertheaders
- the request headers
-