mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-24 07:39:09 +00:00
Replace X-API-Version with API-Version
Closes gh-35494
This commit is contained in:
+2
-2
@@ -40,7 +40,7 @@ public class ApiVersionTests {
|
||||
|
||||
@Test
|
||||
void header() {
|
||||
String header = "X-API-Version";
|
||||
String header = "API-Version";
|
||||
|
||||
Map<String, String> result = performRequest(
|
||||
configurer -> configurer.useRequestHeader(header),
|
||||
@@ -92,7 +92,7 @@ public class ApiVersionTests {
|
||||
@RestController
|
||||
static class TestController {
|
||||
|
||||
private static final String HEADER = "X-API-Version";
|
||||
private static final String HEADER = "API-Version";
|
||||
|
||||
@GetMapping(path = "/**", version = "1.2")
|
||||
Map<String, String> handle(ServerHttpRequest request) {
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ public class ApiVersionTests {
|
||||
|
||||
@Test
|
||||
void header() {
|
||||
String header = "X-API-Version";
|
||||
String header = "API-Version";
|
||||
|
||||
Map<String, String> result = performRequest(
|
||||
request -> request.getHeader(header), ApiVersionInserter.useHeader(header));
|
||||
@@ -96,7 +96,7 @@ public class ApiVersionTests {
|
||||
@RestController
|
||||
private static class TestController {
|
||||
|
||||
private static final String HEADER = "X-API-Version";
|
||||
private static final String HEADER = "API-Version";
|
||||
|
||||
@GetMapping(path = "/**", version = "1.2")
|
||||
Map<String, String> handle(HttpServletRequest request) {
|
||||
|
||||
Reference in New Issue
Block a user