Skip to content

Commit

Permalink
feat: allow http1 protocol on Electric client (#2014)
Browse files Browse the repository at this point in the history
This allows electric client to be used in non-https environments, such
as local development, without additional configuration
  • Loading branch information
icehaunter authored Nov 21, 2024
1 parent 3ef16eb commit 9718ccc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/strong-pumpkins-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@core/elixir-client": patch
---

feat: allow http1 protocotol on Electric client by default
4 changes: 2 additions & 2 deletions packages/elixir-client/lib/electric/client/fetch/http.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ defmodule Electric.Client.Fetch.HTTP do
retry_delay: &retry_delay/1,
max_retries: 6,
# finch: Electric.Client.Finch,
# we use long polling with a timeout of 20s so we don't want Req to error before
# we use long polling with a timeout of 20s so we don't want Req to error before
# Electric has returned something
receive_timeout: 60_000,
connect_options:
Keyword.merge(
[protocols: [:http2]],
[protocols: [:http2, :http1]],
connect_options
)
]
Expand Down

0 comments on commit 9718ccc

Please sign in to comment.