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

[studio] Custom API user agent #3328

Open
oliviertassinari opened this issue Mar 25, 2024 · 0 comments
Open

[studio] Custom API user agent #3328

oliviertassinari opened this issue Mar 25, 2024 · 0 comments
Labels
enhancement This is not a bug, nor a new feature good first issue Great for first contributions. Enable to learn the contribution process. priority: low To delay as much as possible waiting for 👍 Waiting for upvotes

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Mar 25, 2024

Steps to reproduce

Make an HTTP request with Toolpad Studio.

Current behavior

See how the User-Agent is node-fetch https://github.com/node-fetch/node-fetch/blob/8b3320d2a7c07bce4afc6b2bf6c3bbddda85b01f/src/request.js#L278

Expected behavior

Something that helps server to understand where the request comes from. Some 5 years old code I wrote:

  let result = await fetch(`${url}${path}`, {
    method: 'POST',
    headers: {
      'User-Agent': process.browser ? undefined : 'Onepixel/createFetchApi',

Context

https://github.com/mui/mui-private/pull/434

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: -

@oliviertassinari oliviertassinari added priority: low To delay as much as possible enhancement This is not a bug, nor a new feature waiting for 👍 Waiting for upvotes labels Mar 25, 2024
@Janpot Janpot added the good first issue Great for first contributions. Enable to learn the contribution process. label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is not a bug, nor a new feature good first issue Great for first contributions. Enable to learn the contribution process. priority: low To delay as much as possible waiting for 👍 Waiting for upvotes
Projects
None yet
Development

No branches or pull requests

2 participants