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

Add the ability to append parameters to the request in proxy @ytsaurus/javascript-wrapper #1012

Open
bin1357 opened this issue Feb 20, 2025 · 1 comment

Comments

@bin1357
Copy link

bin1357 commented Feb 20, 2025

We are making a request like this:

const yt = require('@ytsaurus/javascript-wrapper')();
yt.setup.setGlobalOption('proxy', params.ytHost);
yt.setup.setGlobalOption('secure', false);
yt.setup.setGlobalOption('authentication', {
    type: 'oauth',
    token: params.ytOauthToken,
});
const res = await yt.v4.writeTable(
    {
        path: `<append=true>${params.ytPath}`,
        input_format: {
            $value: 'json',
            $attributes: {
                string_length_limit: 0,
                encode_utf8: false,
                stringify: 'true',
                annotate_with_types: 'true',
            },
        },
    },
    items,
);

params.ytHost is the domain where the client goes to get the list of endpoint hosts at http://{domain}/hosts (this implementation is inside @ytsaurus/javascript-wrapper),
but we need it to go like this instead: http://{domain}/hosts?role=my-super-role.

@zlobober
Copy link

In this GitHub organization English is used as a primary language, so please stick to it next time.

@zlobober zlobober changed the title Добавить возможность докидывания параметров к запросу в proxy @ytsaurus/javascript-wrapper Add the ability to append parameters to the request in proxy @ytsaurus/javascript-wrapper Feb 20, 2025
@zlobober zlobober transferred this issue from ytsaurus/ytsaurus Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants