Skip to content

fix(httpx): resolve request paths against the base URL - #57

Merged
francoischalifour merged 1 commit into
mainfrom
fix/httpx-base-url
Nov 9, 2026
Merged

francoischalifour merged 1 commit into
mainfrom
fix/httpx-base-url

Conversation

@francoischalifour

Copy link
Copy Markdown
Member

Every request through the HTTPX adapter fails on main with HTTPX::Error: invalid URI: /track (httpx 1.7.3): the client was configured with base_url:, which httpx does not use to resolve relative request paths. Configuring it with origin: resolves /track, /identify and /alias against the base URL, like the Faraday and Net::HTTP adapters.

Adds a loopback delivery spec that posts a real track request through each adapter; it fails for HTTPX before this change.

Split out of #55, where it was flagged as unrelated to audience mode.

@redox redox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gosh, thank you!

@francoischalifour
francoischalifour merged commit f3473fb into main Nov 9, 2026
7 checks passed
@francoischalifour
francoischalifour deleted the fix/httpx-base-url branch November 9, 2026 14:06
francoischalifour added a commit that referenced this pull request Nov 9, 2026
## What

Add immutable `mode: :audience` for scalar, hash, and batch tracking.
Audience events send only `mode`, `event`, `timestamp`, and
`properties`; per-event options and hash or batch fields cannot override
the client's mode. `identify` and `alias` are ignored (with a stderr
warning when `debug` is enabled), and `distinct_id` is not required.
Caller properties pass through unchanged. Product mode remains the
default, and an invalid `mode` raises `ConfigurationError` before a
transport is created.

The HTTPX `origin:` fix that was originally part of this PR is now in
#57.

## Why

Server callers need restricted event collection without product
identifiers. Custom properties remain the application's responsibility,
and server HTTP context does not represent individual visitors.

## Checklist

- [x] Public client specs cover scalar, hash, and batch audience
payloads, mode enforcement over per-event overrides, identity-call
suppression, whole-batch validation, retries, and unchanged product
behavior.
- [x] Public signatures (RBS/RBI), README setup guidance, and changelog
updated.
francoischalifour pushed a commit that referenced this pull request Nov 17, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.4.0](altertable/v1.3.0...altertable/v1.4.0)
(2026-11-09)


### Features

* add audience collection mode
([#55](#55))
([7ecb88c](7ecb88c))
* deprecate analytics environment routing
([#56](#56))
([020e3bf](020e3bf))


### Bug Fixes

* **httpx:** resolve request paths against the base URL
([#57](#57))
([f3473fb](f3473fb))

---
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.

2 participants