Skip to content

estuary-cdk: make _with_token a public API#3722

Merged
Alex-Bair merged 3 commits intomainfrom
bair/estuary-cdk-http-request-lines-alignment
Jan 9, 2026
Merged

estuary-cdk: make _with_token a public API#3722
Alex-Bair merged 3 commits intomainfrom
bair/estuary-cdk-http-request-lines-alignment

Conversation

@Alex-Bair
Copy link
Copy Markdown
Member

Description:

The _with_token parameter is used to control whether or not to include a token from the TokenSource in HTTP requests made through an HTTPSession. For most requests, we do want to include the token in an Authorization header. However, there are legitimate situations where we don't want to include that token, like during OAuth token exchange or when using a pre-signed URL.

During the original development of the CDK, _with_token was marked as an unstable internal API. However, the CDK has developed since then; we've added many of the features mentioned in Johnny's original TODO about why this was an unstable API. While there are still other improvements we want to make to the CDK, I think HTTPSession is mature enough to consider with_token a part of the public API.

Workflow steps:

(How does one use this feature, and how has it changed)

Documentation links affected:

(list any documentation links that you created, or existing ones that you've identified as needing updates, along with a brief description)

Notes for reviewers:

(anything that might help someone review this PR)

The `_with_token` parameter is used to control whether or not to include
a token from the `TokenSource` in HTTP requests made through an
`HTTPSession`. For most requests, we do want to include the token in an
Authorization header. However, there are legitimate situations where we
don't want to include that token, like during OAuth token exchange or
when using a pre-signed URL.

During the original development of the CDK, `_with_token` was marked as
an unstable internal API. However, the CDK has developed since then;
we've added many of the features mentioned in Johnny's original TODO
about why this was an unstable API. While there's still other
improvements we want to make to the CDK, I think `HTTPSession` is mature
enough to consider `with_token` a part of the public API.
…lines`

All public `HTTPSession` methods already support the `_with_lines`
parameter, so `request_lines` should too for congruency.
@Alex-Bair Alex-Bair marked this pull request as ready for review January 7, 2026 17:14
@Alex-Bair Alex-Bair requested a review from a team January 7, 2026 17:14
Copy link
Copy Markdown
Contributor

@JustinASmith JustinASmith left a comment

Choose a reason for hiding this comment

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

LGTM

@Alex-Bair Alex-Bair merged commit 21faa2d into main Jan 9, 2026
106 of 120 checks passed
@Alex-Bair Alex-Bair deleted the bair/estuary-cdk-http-request-lines-alignment branch January 9, 2026 16:33
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