Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Headers

SHIORI Message Headers Container

Hierarchy

Index

Constructors

constructor

  • new Headers(header?: object): Headers
  • initialize headers

    Parameters

    • Default value header: object = {}

      headers

      • [name: string]: string

    Returns Headers

Properties

header

header: object

headers

Type declaration

  • [name: string]: string | undefined

Methods

Reference

  • Reference(index: number): undefined | string
  • Reference* header (SHIORI/2.2-2.6,3.x)

    Parameters

    • index: number

      reference index

    Returns undefined | string

    header value

ReferenceSeparated

  • ReferenceSeparated(index: number, separator?: string): string[]
  • Reference* header (SHIORI/2.2-2.6,3.x)

    Parameters

    • index: number

      reference index

    • Default value separator: string = ""

      separator characters

    Returns string[]

    header values

ReferenceSeparated2

  • ReferenceSeparated2(index: number, separator1?: string, separator2?: string): string[][]
  • Reference* header (SHIORI/2.2-2.6,3.x)

    Parameters

    • index: number

      reference index

    • Default value separator1: string = ""

      first level separator characters

    • Default value separator2: string = ""

      second level separator characters

    Returns string[][]

    header values

get

  • get(name: string): undefined | string
  • get header

    Parameters

    • name: string

      header name

    Returns undefined | string

    header value

get_separated

  • get_separated(name: string, separator?: string): undefined | string[]
  • get header separated by \x01 or some as an array

    Parameters

    • name: string

      header name

    • Default value separator: string = ""

      separator characters

    Returns undefined | string[]

    header values

get_separated2

  • get_separated2(name: string, separator1?: string, separator2?: string): undefined | string[][]
  • get header separated by \x02 and \x01 or some as an array

    Parameters

    • name: string

      header name

    • Default value separator1: string = ""

      first level separator characters

    • Default value separator2: string = ""

      second level separator characters

    Returns undefined | string[][]

    header values

references

  • references(): (undefined | string)[]
  • get Reference* headers

    Returns (undefined | string)[]

    Reference* header values

set

  • set(name: string, value: string | undefined): undefined | string
  • set header

    header will be deleted if value == undefined

    Parameters

    • name: string

      header name

    • value: string | undefined

      header value

    Returns undefined | string

    header value

set_separated

  • set_separated(name: string, value: string[], separator?: string): string
  • set header separated by \x01 or some as an array

    Parameters

    • name: string

      header name

    • value: string[]

      header values

    • Default value separator: string = ""

      separator characters

    Returns string

    header value

set_separated2

  • set_separated2(name: string, value: string[][], separator1?: string, separator2?: string): string
  • set header separated by \x02 and \x01 or some as an array

    Parameters

    • name: string

      header name

    • value: string[][]

      header values

    • Default value separator1: string = ""

      first level separator characters

    • Default value separator2: string = ""

      second level separator characters

    Returns string

    header value

toString

  • toString(): string

validate

  • validate(): void
  • check that headers are line feed free

    throw

    if not

    Returns void

Generated using TypeDoc