How to use the @aws-sdk/util-uri-escape.escapeUri function in @aws-sdk/util-uri-escape

To help you get started, we’ve selected a few @aws-sdk/util-uri-escape 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 aws / aws-sdk-js-v3 / packages / protocol-http / src / httpRequest.ts View on Github external
private buildQueryString(): string {
    const parts: string[] = [];
    for (let key of Object.keys(this.query || {}).sort()) {
      const value = this.query[key];
      key = escapeUri(key);
      if (Array.isArray(value)) {
        for (let i = 0, iLen = value.length; i < iLen; i++) {
          parts.push(`${key}=${escapeUri(value[i])}`);
        }
      } else {
        let qsEntry = key;
        if (value || typeof value === "string") {
          qsEntry += `=${escapeUri(value)}`;
        }
        parts.push(qsEntry);
      }
    }

    return parts.join("&");
  }
}
github aws / aws-sdk-js-v3 / packages / protocol-http / src / httpRequest.ts View on Github external
private buildQueryString(): string {
    const parts: string[] = [];
    for (let key of Object.keys(this.query || {}).sort()) {
      const value = this.query[key];
      key = escapeUri(key);
      if (Array.isArray(value)) {
        for (let i = 0, iLen = value.length; i < iLen; i++) {
          parts.push(`${key}=${escapeUri(value[i])}`);
        }
      } else {
        let qsEntry = key;
        if (value || typeof value === "string") {
          qsEntry += `=${escapeUri(value)}`;
        }
        parts.push(qsEntry);
      }
    }

    return parts.join("&");
  }
}
github aws / aws-sdk-js-v3 / packages / protocol-http / src / httpRequest.ts View on Github external
private buildQueryString(): string {
    const parts: string[] = [];
    for (let key of Object.keys(this.query || {}).sort()) {
      const value = this.query[key];
      key = escapeUri(key);
      if (Array.isArray(value)) {
        for (let i = 0, iLen = value.length; i < iLen; i++) {
          parts.push(`${key}=${escapeUri(value[i])}`);
        }
      } else {
        let qsEntry = key;
        if (value || typeof value === "string") {
          qsEntry += `=${escapeUri(value)}`;
        }
        parts.push(qsEntry);
      }
    }

    return parts.join("&");
  }
}
github aws / aws-sdk-js-v3 / packages / querystring-builder / src / index.ts View on Github external
export function buildQueryString(query: QueryParameterBag): string {
  const parts: string[] = [];
  for (let key of Object.keys(query).sort()) {
    const value = query[key];
    key = escapeUri(key);
    if (Array.isArray(value)) {
      for (let i = 0, iLen = value.length; i < iLen; i++) {
        parts.push(`${key}=${escapeUri(value[i])}`);
      }
    } else {
      let qsEntry = key;
      if (value || typeof value === "string") {
        qsEntry += `=${escapeUri(value)}`;
      }
      parts.push(qsEntry);
    }
  }

  return parts.join("&");
}
github aws / aws-sdk-js-v3 / packages / querystring-builder / src / index.ts View on Github external
export function buildQueryString(query: QueryParameterBag): string {
  const parts: string[] = [];
  for (let key of Object.keys(query).sort()) {
    const value = query[key];
    key = escapeUri(key);
    if (Array.isArray(value)) {
      for (let i = 0, iLen = value.length; i < iLen; i++) {
        parts.push(`${key}=${escapeUri(value[i])}`);
      }
    } else {
      let qsEntry = key;
      if (value || typeof value === "string") {
        qsEntry += `=${escapeUri(value)}`;
      }
      parts.push(qsEntry);
    }
  }

  return parts.join("&");
}
github aws / aws-sdk-js-v3 / packages / querystring-builder / src / index.ts View on Github external
export function buildQueryString(query: QueryParameterBag): string {
  const parts: string[] = [];
  for (let key of Object.keys(query).sort()) {
    const value = query[key];
    key = escapeUri(key);
    if (Array.isArray(value)) {
      for (let i = 0, iLen = value.length; i < iLen; i++) {
        parts.push(`${key}=${escapeUri(value[i])}`);
      }
    } else {
      let qsEntry = key;
      if (value || typeof value === "string") {
        qsEntry += `=${escapeUri(value)}`;
      }
      parts.push(qsEntry);
    }
  }

  return parts.join("&");
}

@aws-sdk/util-uri-escape

[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-uri-escape/latest.svg)](https://www.npmjs.com/package/@aws-sdk/util-uri-escape) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-uri-escape.svg)](https://www.npmjs.com/package/@aws-sd

Apache-2.0
Latest version published 1 year ago

Package Health Score

72 / 100
Full package analysis

Popular @aws-sdk/util-uri-escape functions

Similar packages