Fix syntax for RequestEntity headers example in ref docs

Closes gh-26876
This commit is contained in:
K
2021-04-30 00:34:04 +09:00
committed by GitHub
parent 98770b15e7
commit 26ed6d8bce

View File

@@ -163,7 +163,7 @@ You can use the `exchange()` methods to specify request headers, as the followin
URI uri = UriComponentsBuilder.fromUriString(uriTemplate).build(42);
RequestEntity<Void> requestEntity = RequestEntity.get(uri)
.header(("MyRequestHeader", "MyValue")
.header("MyRequestHeader", "MyValue")
.build();
ResponseEntity<String> response = template.exchange(requestEntity, String.class);