Skip to content

Commit

Permalink
Updated comment
Browse files Browse the repository at this point in the history
  • Loading branch information
corneil committed Aug 22, 2024
1 parent 4883a34 commit 49827e0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ private RestTemplate initRestTemplate(HttpClientBuilder clientBuilder, boolean w
.setDefaultRequestConfig(RequestConfig.custom().setNormalizeUri(false).build())
.build());

// DockerHub response's media-type is application/octet-stream although the content is in JSON.
// Similarly the Github CR response's media-type is always text/plain although the content is in JSON.
// Therefore we extend the MappingJackson2HttpMessageConverter media-types to
// include application/octet-stream and text/plain.
// Extend the MappingJackson2HttpMessageConverter to support the following:
// - DockerHub response media-type is application/octet-stream although the content is in JSON
// - Github CR response media-type is text/plain although the content is in JSON
// - quay.io response media-type is binary/octet-stream although the content is in JSON
MappingJackson2HttpMessageConverter octetSupportJsonConverter = new MappingJackson2HttpMessageConverter();
ArrayList<MediaType> mediaTypeList = new ArrayList(octetSupportJsonConverter.getSupportedMediaTypes());
mediaTypeList.add(MediaType.APPLICATION_OCTET_STREAM);
Expand Down

0 comments on commit 49827e0

Please sign in to comment.