Skip to content

feat: optional http client (faraday/httpx/net-http) with adapter pattern#5

Merged
redox merged 2 commits intoaltertable-ai:mainfrom
albert20260301:feat/optional-http-client
Mar 6, 2026
Merged

feat: optional http client (faraday/httpx/net-http) with adapter pattern#5
redox merged 2 commits intoaltertable-ai:mainfrom
albert20260301:feat/optional-http-client

Conversation

@albert20260301
Copy link
Contributor

@albert20260301 albert20260301 commented Mar 6, 2026

Description

Refactors the Client to use an Adapter pattern, allowing optional support for httpx (HTTP/2 ready), faraday (legacy default), and net/http (zero-dependency fallback).

This change adds optional development dependencies for faraday and httpx.

Closes #4

Changes

  • Introduces Altertable::Adapters::Base interface.
  • Implements FaradayAdapter, HttpxAdapter, and NetHttpAdapter.
  • Updates Client#initialize to auto-detect the best available adapter or accept explicit configuration.
  • Updates altertable-ruby.gemspec to add optional dependencies.

Verification

  • Added spec/adapter_selection_spec.rb to verify adapter selection logic.

@redox redox merged commit 1fb2b79 into altertable-ai:main Mar 6, 2026
4 checks passed
redox pushed a commit that referenced this pull request Mar 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.2.0](altertable-v0.1.0...altertable/v0.2.0)
(2026-03-08)


### Features

* optional http client (faraday/httpx/net-http) with adapter pattern
([#5](#5))
([1fb2b79](1fb2b79))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework HTTP client

2 participants