Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Support Spring 5? #648

Copy link
Copy link
@He-Pin

Description

@He-Pin
Issue body actions

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

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked onThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.