mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 04:27:07 +00:00
[spring] Adapt HttpHeaders access to remain compatible with Spring 7 (#21691)
* [spring] Adapt HttpHeaders access to remain compatible with Spring 7 * update pom.xml patch version
This commit is contained in:
@@ -412,10 +412,7 @@ public class ApiClient extends JavaTimeFormatter {
|
||||
* @return ApiClient this client
|
||||
*/
|
||||
public ApiClient addDefaultHeader(String name, String value) {
|
||||
if (defaultHeaders.containsKey(name)) {
|
||||
defaultHeaders.remove(name);
|
||||
}
|
||||
defaultHeaders.add(name, value);
|
||||
defaultHeaders.set(name, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -777,7 +774,7 @@ public class ApiClient extends JavaTimeFormatter {
|
||||
* @param requestBuilder The current request
|
||||
*/
|
||||
protected void addHeadersToRequest(HttpHeaders headers, RestClient.RequestBodySpec requestBuilder) {
|
||||
for (Entry<String, List<String>> entry : headers.entrySet()) {
|
||||
for (Entry<String, List<String>> entry : headers.headerSet()) {
|
||||
List<String> values = entry.getValue();
|
||||
for(String value : values) {
|
||||
if (value != null) {
|
||||
|
||||
Reference in New Issue
Block a user