Options
All
  • Public
  • Public/Protected
  • All
Menu

Common IO utilities

Hierarchy

  • EncodeUri

Index

Methods

Static Private encCharOnlyForApiml

  • encCharOnlyForApiml(charToEncode: string): string
  • Encode a character for a USS URI path when connecting to API-ML. API-ML fails with an HTTP 400 error unless these characters are encoded. None of these characters will be encoded for z/OSMF. This function relies on its caller to encode characters that must be encoded for both z/OSMF and API-ML (like %), and to not pass those characters to this function.

    Parameters

    • charToEncode: string

      The character to encode.

    Returns string

    • The value of charToEncode for most characters.
                    The URI-encoded value of charToEncode where needed.
      

Static encUriPathForUss

  • URI-Encode a USS file name for use in the path component of a URI.

    Many of the documented USS filename special characters (see https://www.ibm.com/docs/en/zos/3.1.0?topic=pages-zos-data-set-unix-file-naming-conventions) result in the error "HTTP(S) error 500 = Internal Server Error", unless they are encoded.

    A future external change related to URI encoding is expected to reject URIs containing encoded characters such as %2F (the forward slash character '/').

    This function provides a limited encoding for URI paths, which is still required to avoid failures in existing USS REST operations.

    By consolidating URI encoding for USS files in this function, any actions needed to react to future URI encoding changes can be implemented in one place.

    Parameters

    • session: AbstractSession

      The session used to connect to the server.

    • ussUriPath: string

      the URI path to encode

    Returns string

Static encUriPathForZos

Static encUriQueryForUss

  • encUriQueryForUss(ussFileNmForQuery: string): string

Static Private shouldEncodeForApiml

Generated using TypeDoc