How to use the request-light.configure function in request-light

To help you get started, we’ve selected a few request-light examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github threadheap / serverless-ide-vscode / packages / language-server / src / server.ts View on Github external
connection.onDidChangeConfiguration(change => {
		const settings = change.settings as ExtensionSettings
		configureHttpRequests(
			settings.http && settings.http.proxy,
			settings.http && settings.http.proxyStrictSSL
		)

		const languageSettings: LanguageSettings = {
			validate: get(
				settings,
				input => input.serverlessIDE.validate,
				true
			),
			hover: get(settings, input => input.serverlessIDE.hover, true),
			completion: get(
				settings,
				input => input.serverlessIDE.completion,
				true
			),
github OmniSharp / omnisharp-vscode / src / features / json / jsonContributions.ts View on Github external
function configureHttpRequest() {
        let httpSettings = workspace.getConfiguration('http');
        configureXHR(httpSettings.get('proxy'), httpSettings.get('proxyStrictSSL'));
    }
github forcedotcom / salesforcedx-vscode / packages / salesforcedx-utils-vscode / src / requestService / requestService.ts View on Github external
public async execute(
    command: BaseCommand,
    restHttpMethodEnum: RestHttpMethodEnum = RestHttpMethodEnum.Post
  ): Promise {
    if (this.proxyUrl) {
      configure(this._proxyUrl, this._proxyStrictSSL);
    }
    const urlElements = [this.instanceUrl, command.getCommandUrl()];
    const requestUrl =
      command.getQueryString() == null
        ? urlElements.join('/')
        : urlElements.join('/').concat('?', command.getQueryString()!);
    const requestBody = command.getRequest();
    const options: XHROptions = {
      type: restHttpMethodEnum,
      url: requestUrl,
      timeout: this.connectionTimeoutMs,
      headers: {
        'Content-Type': 'application/json;charset=utf-8',
        Accept: 'application/json',
        Authorization: `OAuth ${this.accessToken}`,
        'Content-Length': requestBody
github redhat-developer / yaml-language-server / src / server.ts View on Github external
connection.onDidChangeConfiguration(change => {
    const settings = change.settings as Settings;
    configureHttpRequests(settings.http && settings.http.proxy, settings.http && settings.http.proxyStrictSSL);

    specificValidatorPaths = [];
    if (settings.yaml) {
        yamlConfigurationSettings = settings.yaml.schemas;
        yamlShouldValidate = settings.yaml.validate;
        yamlShouldHover = settings.yaml.hover;
        yamlShouldCompletion = settings.yaml.completion;
        customTags = settings.yaml.customTags ? settings.yaml.customTags : [];

        if (settings.yaml.schemaStore) {
            schemaStoreEnabled = settings.yaml.schemaStore.enable;
        }

        if (settings.yaml.format) {
            yamlFormatterSettings = {
                proseWrap: settings.yaml.format.proseWrap || 'preserve',
github ShyykoSerhiy / vscode-spotify / src / request / request.ts View on Github external
export function configureHttpRequest() {
	let httpSettings = workspace.getConfiguration('http');
	httpRequest.configure(httpSettings.get('proxy', ''), httpSettings.get('proxyStrictSSL', false));
}

request-light

Lightweight request library. Promise based, with proxy support.

MIT
Latest version published 6 months ago

Package Health Score

75 / 100
Full package analysis