Skip to content

Support Spring 5? #648

@He-Pin

Description

@He-Pin

Motivation:

I have to compile and change some code locally to make it works in streamable api.

public final class TmcpResponseHelper {
    public static boolean isBadRequest(final WebClientResponseException responseException) {
        return responseException.getRawStatusCode() == HttpStatus.BAD_REQUEST.value();
    }

    public static boolean isNotFound(ClientResponse response) {
        return response.rawStatusCode() == HttpStatus.NOT_FOUND.value();
    }

    public static boolean isNotAllowed(ClientResponse response) {
        return response.rawStatusCode() == HttpStatus.METHOD_NOT_ALLOWED.value();
    }


    @SuppressWarnings("deprecation")
    public static boolean is200(final ClientResponse response) {
        return response.rawStatusCode() >= 200 && response.rawStatusCode() < 300;
    }


}

delegate the status code check in WebClientStreamableHttpTransport

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions