Send a HTTP POST Request.

Hierarchy (view full)

Properties

abilityAlias?: string
callStack?: CallStackInfo[]
headers: Headers = {}

Methods - Factory

  • Send a HTTP POST request to the specified url. Optionally it is possible to chain definitions for header sand data as well as the expected response type.

    Parameters

    • url: string

      the URL of the target.

    Returns Post

    a new Post instance

    Example

    simple request

    Post.to('https://my-fancy-url.com');
    

    with chained definitions

    Post.to('https://my-fancy-url.com')
    // add headers
    .withHeaders({
    key: value,
    })
    // add data
    .withData({
    key: value,
    })
    // define expected response format
    .withResponseFormat('text');

Methods - Other

  • Parameters

    • entry: CallStackInfo

    Returns void

  • Parameters

    • calledWith: CallStackCalledWith

    Returns void

  • Set the alias which is used for an underlying ability

    Parameters

    • alias: undefined | string

      with which an ability was initialized

    Returns this

    current action

Methods - called internally

Generated using TypeDoc