Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EamuseSend

Hierarchy

  • EamuseSend

Index

Properties

deny

deny: (options?: EamuseSendOption) => Promise<void>

Send empty response with status code 1

Type declaration

object

object: (res: any, options?: EamuseSendOption) => Promise<void>

Send plain javascript object. When constructing objects, make sure to use helper K:

{
  outer: K.ATTR({ status: "1" }, {
    inner: K.ITEM("s32", 1)
  })
}

Or follow xml-like format manually:

{
  outer: {
    "@attr": { status: "1" },
    inner: {
      "@attr": { __type: "s32" },
      "@content": [1]
    }
  }
}
param

xml-like formatted javascript object

param

Response options. See: EamuseSendOption

Type declaration

pug

pug: (res: string, data?: any, options?: EamuseSendOption) => Promise<void>

Send xml data using pug template system.

param

pug string as the template

param

Render template with specified data, pass null or undefined to render static xml

param

Response options. See: EamuseSendOption

Type declaration

    • Parameters

      Returns Promise<void>

pugFile

pugFile: (file: string, data?: any, options?: EamuseSendOption) => Promise<void>

Render and send pug template from a file

param

Filename of the template

param

Render template with specified data, pass null or undefined to render static xml

param

Response options. See: EamuseSendOption

Type declaration

    • Parameters

      Returns Promise<void>

status

status: (code: number, options?: EamuseSendOption) => Promise<void>

Send empty response with custom status code

Type declaration

success

success: (options?: EamuseSendOption) => Promise<void>

Send empty response with status code 0

Type declaration

xml

xml: (res: string, data?: any, options?: EamuseSendOption) => Promise<void>

Send xml data using ejs template system.

param

xml string as the template

param

Render template with specified data, pass null or undefined to render static xml

param

Response options. See: EamuseSendOption

Type declaration

    • Parameters

      Returns Promise<void>

xmlFile

xmlFile: (file: string, data?: any, options?: EamuseSendOption) => Promise<void>

Render and send ejs template from a file

param

Filename of the template

param

Render template with specified data, pass null or undefined to render static xml

param

Response options. See: EamuseSendOption

Type declaration

    • Parameters

      Returns Promise<void>

Generated using TypeDoc