Skip to content

Add constructor with custom HttpClient supplier#1583

Open
TheFaser wants to merge 1 commit into
rubenlagus:masterfrom
TheFaser:master
Open

Add constructor with custom HttpClient supplier#1583
TheFaser wants to merge 1 commit into
rubenlagus:masterfrom
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);
}

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.

1 participant