e5l / http-client-common Goto Github PK
View Code? Open in Web Editor NEWKotlin multiplatform http-client
Kotlin multiplatform http-client
Current API is promise-based, you can't do something like
val body = client.request().blockingGet().body
especially on iOS. Blocking calls are particularly useful for tests but we're using them in app code, too. With rxjava it is super easy to converter blocking call to future and vice versa: Single.fromCallable and Single.blockingGet.
I see in the ktor docs that they support something similar to interceptors, but I'm not seeing that in this repo. Am I missing it, or is there no way to intercept / modify requests with this http client? That seems like core functionality for dealing with things like auth, and adding proper auth headers to all requests.
Implementation itself is pretty trivial, but the most important part is option to pass actual httpclient instance.
Let's update artifacts and documentation to clearly state that native is iOS in current builds
We will create an api core library for service with kotlin native and I knew with your lib.
I implemented your lib and I coded on my Common layer but when I want compile and build from my project get exception to me.
my issue:
` Task :apiCore:androidProcessResources NO-SOURCE
e: /Users/imanx/Desktop/zarinpal-mutliplatform/apiCore/src/commonMain/kotlin/APICore.kt: (3, 30): Unresolved reference: HttpClient
e: /Users/imanx/Desktop/zarinpal-mutliplatform/apiCore/src/commonMain/kotlin/APICore.kt: (4, 35):
FAILURE: Build failed with an exception.
Compilation error. See log for more details`
that issues completely from http-client-common
are
where my problem?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.