-
Notifications
You must be signed in to change notification settings - Fork 66
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
airframe-http: Use HttpMessage.Request/Response as the standard interface #2167
Labels
Milestone
Comments
xerial
added a commit
that referenced
this issue
May 26, 2022
xerial
added a commit
that referenced
this issue
May 27, 2022
…and Scala.js (#2190) With this change, we can use the same Http.client.newSync/AsyncClient interface both for Scala JVM and JS. - Gradually reducing the usage of rich GET/POST/PUT methods with object conversion. This is because airframe-rpc only need to use POST method. If we need such rich HTTP methods, airframe-http-finagle or okhttp can be used for a while. For the default use cases, we will use the default JVM HttpClient or the Scala.js specific implementation without rich HTTP request/response conversions. - URLConnectionClient is changed to implement the new SyncClient interface and dropped rich HTTP method support. - The new Sync/AsyncClient interface has rpc[Req, Resp] method, which will be used in code generator. We will be able to use the same RPC client code both for Scala JVM and Scala.js Related: #2167 #2140
3 tasks
xerial
added a commit
that referenced
this issue
Apr 25, 2023
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Historically, we needed to manage various http request/response types of Finagle, OkHttp, etc. Now that airframe-http has its own HttpMessage.Request/Response types, we should be able to wrap backend-specific request/response types into the unified http requests and responses.
Converting backend specific requests (e.g., Fingagle request) to HttpMesage.Request is not expensive. Currently, using backend-specific implementation has much higher cost.
Projects using backend-specific request/response types:
Benefits:
Steps:
The text was updated successfully, but these errors were encountered: