Skip to content

Commit

Permalink
http-client-java, remove code of convert contentType to header param (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft authored Dec 12, 2024
1 parent df5a885 commit c315925
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import java.util.ListIterator;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
Expand Down Expand Up @@ -206,19 +205,6 @@ private void transformOperationGroups(List<OperationGroup> operationGroups, Code
}
}
}
// convert contentType to header param
Optional<Parameter> contentType = request.getParameters()
.stream()
.filter(p -> (p.getProtocol() == null || p.getProtocol().getHttp() == null)
&& "contentType".equals(p.getLanguage().getDefault().getName()))
.findFirst();
if (contentType.isPresent()) {
Protocols protocols = new Protocols();
protocols.setHttp(new Protocol());
protocols.getHttp().setIn(RequestParameterLocation.HEADER);
contentType.get().setProtocol(protocols);
contentType.get().getLanguage().getDefault().setSerializedName("Content-Type");
}
}
renameOdataParameterNames(request);
deduplicateParameterNames(request);
Expand Down

0 comments on commit c315925

Please sign in to comment.