Skip to content
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

Can you upgrade to Okhttp 4? #16

Open
limuyang2 opened this issue Jan 24, 2023 · 1 comment
Open

Can you upgrade to Okhttp 4? #16

limuyang2 opened this issue Jan 24, 2023 · 1 comment

Comments

@limuyang2
Copy link
Contributor

// TODO(danstahr): OkHttp 4 can use isOneShot flag here and rewind safely.

Implement this TODO using okhttp4

@limuyang2
Copy link
Contributor Author

override fun rewind(uploadDataSink: UploadDataSink) {
    // TODO(danstahr): OkHttp 4 can use isOneShot flag here and rewind safely.
    if (okHttpRequestBody.isOneShot()) {
        uploadDataSink.onRewindError(Exception("This request can only be transmitted once"))
    } else {
        uploadDataSink.onRewindSucceeded()
    }
}

Is my usage correct?

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

No branches or pull requests

1 participant