Skip to content

Implement custom http request timeout executor #1624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2025

Conversation

IvanBorislavovDimitrov
Copy link
Contributor

No description provided.

@IvanBorislavovDimitrov IvanBorislavovDimitrov force-pushed the custom-http-executor branch 2 times, most recently from 2e777bc to a86eea9 Compare April 10, 2025 13:08
}

public <T> T executeWithTimeout(HttpUriRequest request, long timeoutInMillis, Function<HttpResponse, T> responseHandler) {
TimerTask task = buildAbortRequestTimerTask(request);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename task to something a bit more descriptive - e.g. abortRequestTask


public <T> T executeWithTimeout(HttpUriRequest request, long timeoutInMillis, Function<HttpResponse, T> responseHandler) {
TimerTask task = buildAbortRequestTimerTask(request);
Timer timer = new Timer(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@IvanBorislavovDimitrov IvanBorislavovDimitrov merged commit 84e49c4 into master Apr 11, 2025
7 checks passed
@IvanBorislavovDimitrov IvanBorislavovDimitrov deleted the custom-http-executor branch April 11, 2025 12:34
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.

3 participants