Skip to content

Instantly share code, notes, and snippets.

View tl-andrea-dilisio's full-sized avatar

Andrea Di Lisio tl-andrea-dilisio

View GitHub Profile
@RyanRamchandar
RyanRamchandar / Example.java
Last active November 9, 2022 17:27
Cancel a running or queued Call with OkHttp3
// ...
Request request = new Request.Builder()
.url(url)
.tag(TAG)
.build();
// Cancel previous call(s) if they are running or queued
OkHttpUtils.cancelCallWithTag(client, TAG);
// New call