Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ILinkRemoteImmutable

A readonly variant of the interface

Hierarchy

Index

Properties

Optional body

body: undefined | string

The headers to add to the request. Each header can be a {{ mustache }} template that can use keys from the context. There is a special {{ context }} key that can be used to serialize the whole context as JSON. The body defaults to the context as JSON, which is equivalent to '{{{context}}}'

example
Using template replacement ```ts { body: '{"correctAnswers": {{correct}}, "totalAnswers": {{total}} }' } ```
example
Sending the whole context ```ts { body: '{{context}}' } ```

Optional headers

headers: undefined | object

The headers to add to the request. Each header can be a {{ mustache }} template that can use keys from the context. You will highly likely need the triple ({{{ }}}) mustache to prevent HTML entity escaping

example
{
  headers: {
    'token': '{{{token}}}'
  }
}

Optional method

method: undefined | string

The type of method to perform on the endpoint. Defaults to POST

Optional redirect

redirect: string | IGuidImmutable

An optional redirect that will override the link of the next formation. This is really useful when a formation needs to be injected into a conversation flow.

type

type: Type.Remote

url

url: string | IUrlImmutable

The URL endpoint to perform the request to