Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ private Flux<McpSchema.JSONRPCMessage> extractError(ClientResponse response, Str
}
catch (IOException ex) {
toPropagate = new McpTransportException("Sending request failed, " + e.getMessage(), e);
logger.debug("Received content together with {} HTTP code response: {}", response.rawStatusCode(),
logger.debug("Received content together with {} HTTP code response: {}", response.statusCode().value(),
body);
}

Expand Down Expand Up @@ -608,33 +608,29 @@ public WebClientStreamableHttpTransport build() {
/**
* Needed for Spring 5 compatibility
*/
@SuppressWarnings("deprecation")
private static boolean isBadRequest(final WebClientResponseException responseException) {
return responseException.getRawStatusCode() == HttpStatus.BAD_REQUEST.value();
return responseException.getStatusCode().value() == HttpStatus.BAD_REQUEST.value();
}

/**
* Needed for Spring 5 compatibility
*/
@SuppressWarnings("deprecation")
private static boolean isNotFound(ClientResponse response) {
return response.rawStatusCode() == HttpStatus.NOT_FOUND.value();
return response.statusCode().value() == HttpStatus.NOT_FOUND.value();
}

/**
* Needed for Spring 5 compatibility
*/
@SuppressWarnings("deprecation")
private static boolean isNotAllowed(ClientResponse response) {
return response.rawStatusCode() == HttpStatus.METHOD_NOT_ALLOWED.value();
return response.statusCode().value() == HttpStatus.METHOD_NOT_ALLOWED.value();
}

/**
* Needed for Spring 5 compatibility
*/
@SuppressWarnings("deprecation")
private static boolean is2xx(final ClientResponse response) {
return response.rawStatusCode() >= 200 && response.rawStatusCode() < 300;
return response.statusCode().value() >= 200 && response.statusCode().value() < 300;
}

}