Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(js): add JS user agent to Algolia requests #420

Merged
merged 3 commits into from
Feb 1, 2021

Conversation

francoischalifour
Copy link
Member

This adds the Autocomplete JS user agent to the Algolia network requests. It adds an API to the getAlgoliaResults and getAlgoliaHits functions from the Algolia preset to allow custom user agents.

Each Algolia call from Autocomplete JS will now have this header:

x-algolia-agent: Algolia for JavaScript (4.8.3); Browser; autocomplete-core (1.0.0-alpha.39); autocomplete-js (1.0.0-alpha.39)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 28, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 821bda9:

Sandbox Source
@algolia/js-example Configuration
@algolia/react-renderer-example Configuration

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

LGTM!

@francoischalifour francoischalifour merged commit fab2d57 into next Feb 1, 2021
@francoischalifour francoischalifour deleted the feat/js-user-agent branch February 1, 2021 13:46
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