Comments (6)
in our usecases we not read response headers yet and do status code checks only in ErrorFeature (if status code not successful then this feature try create exception for this case).
i think it will be good if we add HttpResponse<Model>
case in generation, in addition to already exists methods
from moko-network.
@ATchernov the problem is that you still support only 1.3.50
version of kotlin. You need to update the kotlin-multiplatform generator to address the new kotlin versions and maintain that in a faster way [-;
from moko-network.
@shadowsheep1 moko-network use 1.3.70, what do you mean about 1.3.50?
from moko-network.
Hey @ATchernov didn't see you're a moko-network contrib, thinking you were from openapi plugin, sorry. Moko is great 'casue it follows tight kotlin version releases, while the openapi client gen is stuck on 1.3.50
.
https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/kotlin.md
OpenAPITools/openapi-generator#5346
At a first look, you differ from the kotlin-multiplatform version
--library multiplatform
java -jar openapi-generator-cli-4.2.2.jar generate -g kotlin -p packageName=it.shadowsheep.mpp.app.client --library multiplatform --additional-properties nonPublicApi=true -i openapi.yaml -o open_mpp
of openapi-client client gen because you return the Model
and not the HttpResponse<Model>
of the model.
This way how do you propagate http response status code
and headers
? This info should be useful.
/cc @Alex009
from moko-network.
required usecase - reading of headers in response
from moko-network.
Another use case is that we have response status code with a deeper meaning (read custom meaning) so that we act in some way when we have a particular status code.
from moko-network.
Related Issues (20)
- Support JS (both) targets
- Support Windows target
- Support Linux targets
- query param name starts with a number
- Missing query param default value
- HI
- Allow UserAgent feature to have a dynamic source of its value HOT 1
- TokenFeature.TokenProvider should be a fun interface HOT 2
- Update Network Generator for Ktor 2.0.1 HOT 1
- Add ability for include/exclude tags for generation
- Network Generator Inline Objects Naming
- Is the way to change property type from Int to Long? HOT 1
- Broken iOS 12 support
- Invalid isNetworkConnectionError result on iOS
- Update moko-resources dependency without cinterop-pluralizedString HOT 1
- Update to later Ktor HOT 3
- Add method to Safeable to map null to a particular value
- Add the value being deserialized to Safeable wrapper
- Improper error handling for method with no return type HOT 3
- RefreshTokenPlugin: excecution is locked when updateTokenHandler gets 401 error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moko-network.