Skip to content

RestClient adapter for RestOperations #32598

@tgeens

Description

@tgeens

Lots of existing (Spring) infrastructure accepts RestOperations as a pluggable http/rest client and I could not find any adapter that implements the old RestOperations, but is backed by the new RestClient.

I know the RestClient can be constructed from a RestTemplate, but I would prefer - especially in a new/greenfield project - to base everything of the new RestClient and have an adapter to map this back to RestOperations when needed.

Are there plans for, or would you accept a PR for something along these lines ?

public class RestOperationsAdapter implements RestOperations {

    public static RestOperationsAdapter create(RestClient restClient) {
        ....
    }
    ....
}

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently apply

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions