Hello , I try to call web service that return as content type application/octet-stream this is my code
return webClientBuilder.build()
.post()
.uri(acquireLockUri)
.contentType(APPLICATION_JSON_UTF8)
.accept(APPLICATION_OCTET_STREAM)
.header("X-token", tuples.getT2())
.body(just(tuples.getT3()), AcquireLockRequest.class)
.exchange()
.flatMap(clientResponse -> {
return clientResponse.bodyToMono(ByteArrayResource.class).map(byteArrayResource -> {
return Mono.just(new String(byteArrayResource.getByteArray()));
});
})
.onErrorResume(Mono::error);
and i got org.springframework.web.reactive.function.UnsupportedMediaTypeException: Content type 'application/octet-stream' not supported
Comment From: priyankagoel02
What is the solution for this problem As I am also getting same erro
Comment From: ryanb93
Same issue here, happened after upgrading from 2.3
to 2.4