Skip to content

Add constructor with custom HttpClient supplier - #1583

Open
TheFaser wants to merge 7 commits into
rubenlagus:devfrom
TheFaser:master
Open

Add constructor with custom HttpClient supplier#1583
TheFaser wants to merge 7 commits into
rubenlagus:devfrom
TheFaser:master

Conversation

@TheFaser

Copy link
Copy Markdown

This PR adds a new constructor that allows overriding OkHttpClient while keeping the default ObjectMapper

Problem

Current constructors require both ObjectMapper and HttpClient suppliers. This causes issues when ObjectMapper is relocated to a different namespace

Solution

public TelegramBotsLongPollingApplication(Supplier<OkHttpClient> okHttpClientCreator) {
    this(ObjectMapper::new, okHttpClientCreator);
}

@rubenlagus
rubenlagus changed the base branch from master to dev July 12, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants