An action that uses POST request to an HTTP endpoint.
const card = new MessageCard("Card Test", "Card created: Test", "Lorem ipsum dolor sit amet");const moveAction = new ActionCardAction("Move");const moveActionOK = new HttpPostAction("https://trello.com", "ok");moveActionOK.body = "body of post request";const moveActionHttpPostActions: HttpPostAction[] = [moveActionOK];moveAction.actions = moveActionHttpPostActions;const choice1 = new MultiChoiceInputChoice("Choice 1", "Choice 1");const choice2 = new MultiChoiceInputChoice("Choice 2", "Choice 2");const choices: MultiChoiceInputChoice[] = [choice1, choice2];const multiChoiceInput = new MultiChoiceInput("id", "Pick as list", "", choices)const multiChoiceInputs: MultiChoiceInput[] = [multiChoiceInput];moveAction.inputs = multiChoiceInputs;const potentialActions: ActionCardAction[] = [moveAction];card.potentialAction = potentialActions; Copy
const card = new MessageCard("Card Test", "Card created: Test", "Lorem ipsum dolor sit amet");const moveAction = new ActionCardAction("Move");const moveActionOK = new HttpPostAction("https://trello.com", "ok");moveActionOK.body = "body of post request";const moveActionHttpPostActions: HttpPostAction[] = [moveActionOK];moveAction.actions = moveActionHttpPostActions;const choice1 = new MultiChoiceInputChoice("Choice 1", "Choice 1");const choice2 = new MultiChoiceInputChoice("Choice 2", "Choice 2");const choices: MultiChoiceInputChoice[] = [choice1, choice2];const multiChoiceInput = new MultiChoiceInput("id", "Pick as list", "", choices)const multiChoiceInputs: MultiChoiceInput[] = [multiChoiceInput];moveAction.inputs = multiChoiceInputs;const potentialActions: ActionCardAction[] = [moveAction];card.potentialAction = potentialActions;
Readonly
Optional
Generated using TypeDoc
Description
An action that uses POST request to an HTTP endpoint.
Example