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

feature(network): introducing Ktor interceptor #272

Merged
merged 5 commits into from
Sep 13, 2023
Merged

Conversation

srtvprateek
Copy link
Member

  • Ktor interceptor introduced
  • Custom interceptor exposed

epicadk and others added 2 commits September 13, 2023 01:02
* feat: ktor interceptor

* address review comments

* ktlint

* address review comments

* Update build.gradle

---------

Co-authored-by: Prateek <[email protected]>
* refactor & fixes

* refactor

* removed need to add base module as dependency

* code restructure

* refactor

* refactor

* move CacheDirectoryProvider to okhttp module

* PlutoInterceptor refactored

* refactor

* PlutoKtorInterceptor refactored

* access modifier fixed

* gradle fixes

* access modifier fixed

* mock setting in ktor interceptor

* refactor

* publish config fixes

* removed old custom interceptor logic

* data field cleanup

* init

* content type fix

* query param incorrect data fix

* sample code refactor

* fix(pluto): missing no-op methods added (#271)

* fix(pluto): missing no-op methods added

* pending fix

* added core no-op

* renaming
Copy link
Contributor

@epicadk epicadk left a comment

Choose a reason for hiding this comment

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

Just some nits, overall Looks good!

@@ -24,8 +24,9 @@ import com.pluto.utilities.share.Shareable
import com.pluto.utilities.share.lazyContentSharer
import com.pluto.utilities.spannable.setSpan
import com.pluto.utilities.viewBinding
import io.ktor.http.Url

Copy link
Contributor

Choose a reason for hiding this comment

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

The reason I used the Ktor url here is that it is multiplatform. not sure is this should be avoided since this dependency will go to people not using ktor as well :/.

Copy link
Member Author

Choose a reason for hiding this comment

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

this is ok,
this is part of core module.

@srtvprateek srtvprateek merged commit 13b6d29 into develop Sep 13, 2023
5 checks passed
@srtvprateek srtvprateek deleted the network_ktor branch September 13, 2023 18:30
@srtvprateek srtvprateek linked an issue Sep 13, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does pluto able to intercept HTTP Request e.g other than Okhttp?
2 participants