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

Add conditional import for ByteReadChannel in MockEngine test code #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

UnlikeMars
Copy link
Contributor

Currently, the test code generation imports kotlinx.coroutines.experimental.io.*, required by ByteReadChannel for all Ktor versions. From ktor 1.3.0 the API changed and ByteReadChannel is now located under io.ktor.utils.io.* . As a result, generated Ktor projects (version >= 1.3.0) using the Mock HttpClient Engine do not compile.

This PR addresses #27 and points ByteReadChannel to the correct import depending on the selected Ktor version.

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