Skip to content
This repository was archived by the owner on May 17, 2019. It is now read-only.
This repository was archived by the owner on May 17, 2019. It is now read-only.

There is no way to cancel a request #149

@wbinarytree

Description

@wbinarytree

version : 'com.twitter.sdk.android:twitter-core:3.3.0'

I use custom event for reqeust the tempToken using OAuth1aService::requestTempToken.
The code is

    public void requestTempToken(final Callback<OAuthResponse> callback) {
        final TwitterAuthConfig config = getTwitterCore().getAuthConfig();
        final String url = getTempTokenUrl();

        api.getTempToken(new OAuth1aHeaders().getAuthorizationHeader(config, null,
                buildCallbackUrl(config), "POST", url, null)).enqueue(getCallbackWrapper(callback));
    }

So it enqueue the request directly without returning anything. That's means there is access to the call and hence no way to cancel that request. Which can lead to an memory leak or crash after Activity destroyed.

Can you add the call himself as an return value? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions