Skip to content

use X-Adapt-Org header from config.toml#11

Open
Jumballaya wants to merge 1 commit into
guimorg:mainfrom
Jumballaya:pgb/add-adapt-org-header
Open

use X-Adapt-Org header from config.toml#11
Jumballaya wants to merge 1 commit into
guimorg:mainfrom
Jumballaya:pgb/add-adapt-org-header

Conversation

@Jumballaya

Copy link
Copy Markdown

Hey, I am an engineer at Adapt and absolutely love seeing that someone is building on top of Adapt!

This adds the X-Adapt-Org header to the call to the Adapt MCP and makes it so it can be added via the config.toml

The org-id can be found here -- https://app.adapt.com/settings/organization

Screenshot 2026-07-15 at 1 18 20 PM

Comment thread src/adapt_client.rs
Comment on lines +325 to +331
fn adapt_http_client(config: &AdaptConfig) -> Result<reqwest::Client, auth::AuthError> {
reqwest::Client::builder()
.timeout(Duration::from_secs(15))
.default_headers(adapt_headers(config)?)
.build()
.map_err(|error| auth::map_transport_error(error, &config.bearer_token))
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

way better to place this here! ty!

@guimorg guimorg left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yo, @Jumballaya! So awesome! Thank you for you contribution!

One question and just a few changes that I ask:

Question: so, is the Adapt Org suppose to be required? So far I was not using it because I belong in a single organization, so I'm just wondering if the org id should actually be optional!

The only changes I ask are related to solving the merge conflict (sorry about that) and using gitmoji (so just add a ✨ to the PR title and the commit 😅 ).

Awesome to see a contribution from the Adapt team!

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