OkHttp
rife2
OkHttp | rife2 | |
---|---|---|
43 | 14 | |
45,272 | 210 | |
0.2% | 1.9% | |
9.5 | 7.8 | |
3 days ago | 3 days ago | |
Kotlin | Java | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
OkHttp
-
Consuming and Testing third party API's using Spring Webclient
We will use Square’s Mock Webserver to spin up a mock server which we can use to simulate real api's request to the get coffee endpoint.
-
Chat with any GPT right through your favorite text editor
OkHttp Documentation
-
Is there a server simulator available for testing API endpoints with low code or no code configuration?
mockwebserver -> https://github.com/square/okhttp/tree/master/mockwebserver
-
Do you use OkHttp with custom maxRequestsPerHost or maxIdleConnections?
I searched in the OkHttp GitHub project for an advice on which values may be suitable for Android apps nowadays but found no answers (only this old issue which does not help). Since we share a single OkHttp client Singleton for all our retrofit APIs and even Coil, I wonder if the default 5 maxRequestsPerHost is really enough.
-
Introduction to HTTP Multipart
You can technically add a Content-Length header for each part. It's not forbidden by the RFC, but nor is it common. It caused [problems](https://github.com/square/okhttp/issues/2138) for OkHttp, and they eventually removed it. Might be fine for internal-only use, though.
Boundaries are a lot like UUIDs, and rely on the same logic. When generating random data, once you have enough bits, the odds are against that sequence of bits ever having been generated before in the universe.
-
Introducing Bld: A New Pure Java Build System
Lets be specific. This is the gradle build file for Squares okhttp client library. How exactly would your bld tool "predict" or "help" with all the parameters needed? There is no need to be defensive. Replace those large build files with your own, show where your approach is better and then understanding will lead to better solutions.
-
[HELP] Add a dependency in IntelliJ
And adding to that: The asynchttpclient library is just a thin wrapper around OkHttp3, so it might be easier to just go with that instead: https://square.github.io/okhttp/
-
What stack to use for app with functionality like event calendar?
Retrofit in combination with OkHttp for fetching data from server (which hopefully already exists)
- Generate Kotlin client for a complex web API
-
Modern Android Development in 2023
OkHttp
rife2
-
Introducing Bld: A New Pure Java Build System
It is possible, and I realize we've not written docs about it yes, we'll fix that soon. We're using two modules in RIFE2 and bld itself, one for the main build and one for the framework examples https://github.com/rife2/rife2/tree/main/src/bld/java/rife
-
Rife Is a Framework Experiment
There's more detail in the readme on GitHub:
https://github.com/gbevin/rife2
Including:
> RIFE2 has features that after 20 years still can't be found elsewhere: web continuations, bidirectional template engine, bean-centric metadata system, full-stack without dependencies, metadata-driven SQL builders, content management framework, full localization support, resource abstraction, persisted cron-like scheduler, continuations-based workflow engine.
Doesn't appear to have websocket support, though.
- Effortlessly create web applications with modern Java
- RIFE2 v1.3.0 with GraalVM native-image AOT compilation support
-
Getting Started with RIFE2
I'm very excited to see what web projects, both big and small, can be accomplished with such a self-contained framework like RIFE2. And we've only scratched the surface! There's a built-in template system, Continuations, and much more. Definitely read the docs if you want to dig deeper into this framework. Also, be sure to thank the framework author, Geert Bevin, for the amount of effort he has put into this!
-
RIFE2 web framework v1.0.0 released!
The validation and meta-data however doesn't require the model to extend a class, there's the possibility to use meta-data merging to have a sibling class that implements the RIFE2 specific logic, which will be merged at runtime through bytecode instrumentation: https://github.com/gbevin/rife2/wiki/Metadata-Merging
-
We released a small no-dependencies UrlEncoder library for Kotlin and Java that actually encodes URL parameters and not HTML form parameters, as the JDK URLEncoder does.
RIFE2 does support arbitrary parameters, in various ways. The manual way is when generating a URL with urlFor, you can add parameters to it c.urlFor(route).param(key, value).param(key, value). You can also annotated Element class fields with @Parameter which will have RIFE2 automatically inject the incoming value, there's an additional annotation attribute that can be set to specific the flow of the data: in, out or inout. When you generate a URL with c.urlFor(route), RIFE2 will look at the element currently in your context, the element targeted by your route and any out parameters that have corresponding in parameter names on the target, will be automatically added to the generated URL with the value they currently hold. Some of that is documented here, but it could definitely use some more love: https://github.com/gbevin/rife2/wiki/Field-Annotations
-
Excited for 2023!
Java seems to have gained a second wind in recent years, and the innovation in this ecosystem is speeding up. Java 20 and LTS release 21 are expected to happen this year. RIFE2, an actively-developed pure-Java web framework, has recently caught my attention. Like Javalin, it appears to be built on top of the successful Jetty server. I also started exploring FXGL for building games with Java. Lastly, as concerns over COVID-19 variants wane I expect an increase in Java developers participating in community events. For example, Chicago finally had its first in-person JConf event and the Chicago Java User Group (CJUG) is easing back into in-person events.
-
RIFE2 web framework under development
There's a step-by-step readme to get a quick glance at the feel and the approach: https://github.com/gbevin/rife2/blob/main/README.md, a series of concise examples https://github.com/gbevin/rife2/tree/main/app/src/main/java/rife and a growing full manual: https://github.com/gbevin/rife2/wiki
What are some alternatives?
unirest-java - Unirest in Java: Simplified, lightweight HTTP client library.
penna - Opinionated SLF4J backend that logs natively to json
Async Http Client - Asynchronous Http and WebSocket Client library for Java
savant-core - This is the main project for the Savant build tool
Netty - Netty project - an event-driven asynchronous network application framework
FXGL - Java / JavaFX / Kotlin Game Library (Engine)
Retrofit - A type-safe HTTP client for Android and the JVM
renovate - Universal dependency automation tool.
Android Volley
Gradle - Adaptable, fast automation for all
gRPC - The Java gRPC implementation. HTTP/2 based RPC
maven-mvnd - Apache Maven Daemon