Skip to content

💡 [Feature Request] Migrate from OkHttp to Feign #1564

@yvasyliev

Description

@yvasyliev

Is your feature request related to a problem? Please describe.

I would like to be able to provide my own HTTP client to interact with Telegram Bots API. In fact, JDK 11 HttpClient is sufficient to displace OkHttp usage while allowing to get rid of Kotlin & third-party dependencies and supporting CompletableFuture natively.

Describe the solution you'd like

Feign is a declarative HTTP client that allows users to use whatever HTTP client implementation they want (JDK 11 HttpClient, OkHttp, Apache HC, etc.). I think Feign is the best candidate for API wrapper libraries like telegram-bots.

Describe alternatives you've considered

An alternative might be a custom HttpClient interface with default OkHttp implementation. However, I think this approach would be an overengineering since Feign already exists.

Additional context

Unlike OkHttp, Feign is a declarative client, meaning that complete API methods rework is required bringing severe breaking changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions