Skip to content

Fix README to correct ConnectRPC channel builder name #157

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

Merged
merged 1 commit into from
Jun 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ val httpServer: Resource[IO, org.http4s.server.Server] = {
httpServer.use(_ => IO.never).unsafeRunSync()
```

### Initializing a ConnectRPC client with http4s:
### Initializing a ConnectRPC client with http4s

`ConnectHttp4sClientBuilder` is used to create a `Channel` that can connect to other services using Connect protocol.
`ConnectHttp4sChannelBuilder` is used to create a `Channel` that can connect to other services using Connect protocol.
Channel's are low-level GRPC abstraction, which can be used to create GRPC stubs for the services.
The Channel generated by the builder will communicate with the ConnectRPC server using JSON messages.
All 3 popular Scala libraries for GRPC (`ScalaPB`, `fs2-grpc`, `zio-grpc`)
Expand All @@ -224,14 +224,14 @@ Example:

```scala
val client: Resource[IO, ExampleServiceFs2Grpc] = {
import org.ivovk.connect_rpc_scala.http4s.ConnectHttp4sClientBuilder
import org.ivovk.connect_rpc_scala.http4s.ConnectHttp4sChannelBuilder

for {
// You can use any http4s client implementation
httpClient <- EmberClientBuilder.default[IO].build

// Create a Connect RPC client channel
channel <- ConnectHttp4sClientBuilder.forUrl[IO]()
channel <- ConnectHttp4sChannelBuilder[IO](httpClient)
.build("http://localhost:8080")

// Use the channel to create a GRPC stub for your service
Expand Down