Skip to content

Fix: apply client.registerAPIRequestMiddleware to SDK streaming requests#163

Merged
andybharness merged 1 commit intoharness:mainfrom
EmilianoSanchez:fix-registerAPIRequestMiddleware-streaming
Aug 20, 2025
Merged

Fix: apply client.registerAPIRequestMiddleware to SDK streaming requests#163
andybharness merged 1 commit intoharness:mainfrom
EmilianoSanchez:fix-registerAPIRequestMiddleware-streaming

Conversation

@EmilianoSanchez
Copy link
Contributor

@EmilianoSanchez EmilianoSanchez commented Aug 19, 2025

Usage example to add a custom header to SDK /stream requests:

  const ffClient = initialize(
    sdkKey, {
    identifier: id,
  });
  
  ffClient.registerAPIRequestMiddleware(([url, options]) => {
    if (url.includes('/stream')) {
      options.headers['X-Custom-Header'] = 'CustomValue';
    }
    return [url, options];
  });

@EmilianoSanchez EmilianoSanchez force-pushed the fix-registerAPIRequestMiddleware-streaming branch from 4494ebf to a9687e3 Compare August 19, 2025 20:40
@andybharness andybharness merged commit 061e920 into harness:main Aug 20, 2025
1 check passed
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