Class sstp_info_t

sstp message class

let info = new jsstp.sstp_info_t("SSTP/1.4 200 OK\r\nCharset: UTF-8\r\nSender: SSTP Client\r\nScript: \\h\\s0Testing!\\u\\s[10]It's a test.\r\nOption: notranslate\r\n\r\n");
console.log(info.head);//SSTP/1.4 200 OK
console.log(info.Option);//notranslate

jsstp.sstp_info_t

Hierarchy (view full)

Indexable

  • [key: `some ${string}`]: String | undefined

    Other message members

Constructors

  • Constructing sstp_info_t from a string

    Parameters

    • str: String

      string message

    Returns sstp_info_t

    Constructed sstp_info_t

    let info = new sstp_info_t("SSTP/1.4 200 OK\r\nCharset: UTF-8\r\nSender: SSTP Client\r\nScript: \\h\\s0Testing!\\u\\s[10]It's a test.\r\nOption: notranslate\r\n\r\n");
    

Accessors

  • get entries(): [key_T, value_T][]
  • Get an array of all key-value pairs.

    Returns [key_T, value_T][]

  • get head(): String
  • Get the header of the message

    Returns String

    message header

  • get keys(): key_T[]
  • Get an array of all keys

    Returns key_T[]

  • get length(): number
  • Get the number of members

    Returns number

  • get passthroughs(): info_object<PropertyKey, any>
  • Get all PassThru

    Returns info_object<PropertyKey, any>

    all PassThru

  • get status_code(): sstp_return_code_t
  • Get header return code (NaN if unexpected)

    Returns sstp_return_code_t

    header return code (NaN if unexpected)

  • get text_content(): String
  • Getting a String Message

    Returns String

    String message.

  • get trivial_clone(): info_object<key_T, value_T>
  • Copy a new object

    Returns info_object<key_T, value_T>

    Copied object

  • get unknown_lines(): String[]
  • Get array of unknown rows

    Returns String[]

    array of unknown rows

  • get values(): value_T[]
  • Get an array of all values

    Returns value_T[]

Methods

  • Traverses itself and its children and returns a one-dimensional array of traversal results.

    Type Parameters

    • T

    Parameters

    • func: ((...dimensions_with_value_in_last: [...string[], string]) => T)

      Function to execute, the return value will be added to the array.

        • (...dimensions_with_value_in_last): T
        • Parameters

          • Rest...dimensions_with_value_in_last: [...string[], string]

          Returns T

    Returns T[]

  • Execute a function for each key-value pair.

    Parameters

    • func: ((value: string, key?: string) => string)

      A function to be executed that replaces value if the return value is not undefined.

        • (value, key?): string
        • Parameters

          • value: string
          • Optionalkey: string

          Returns string

    Returns void

  • Get the value of PassThru

    Parameters

    • key: String

      The name of the PassThru to get.

    Returns String

    the value of PassThru

  • Traverses itself and returns a one-dimensional array of traversal results.

    Type Parameters

    • T

    Parameters

    • func: ((value: string, key?: string) => T)

      Function to execute, the return value will be added to the array.

        • (value, key?): T
        • Parameters

          • value: string
          • Optionalkey: string

          Returns T

    Returns T[]