Skip to content

URL tag POST data not working #571

@morat523035

Description

@morat523035

I cannot get the URL tag working with post data. Any ideas?

I got the SCRIPT tag working with post data.

  • Open Quicktext Settings
  • Templates > Add group > Title: MyGroup
  • Templates > Add templates > Title: MyTemplate

[[SCRIPT=MyScript]]

Insert as: HTML

  • Scripts > Add script > Title: MyScript
function makeRequest() {
  return new Promise(function (resolve) {
    var xhr = new XMLHttpRequest();
    xhr.open("POST", "http://www.dsl-mud.org/algoron/equipment/keyword_items.asp", true);
    xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    xhr.onload = function () {
      if (xhr.status == 200) {
        resolve(xhr.responseText);
      }
    };
    xhr.send("keyword=leather%20bracer");
  });
}
this.compose.setComposeDetails({
  body: '<body style="background-color:black;"></body>',
});
return await makeRequest();

POST example - type leather bracer in box and click button
http://www.dsl-mud.org/algoron/equipment.asp
http://www.dsl-mud.org/algoron/equipment/keyword_items.asp

Quicktext wiki - URL tag
http://github.com/jobisoft/quicktext/wiki/List-of-all-supported-tags#url

Quicktext 6.4
Thunderbird ESR 140.4.0
Windows 10 Pro 22H2 32-bit

Metadata

Metadata

Assignees

No one assigned

    Labels

    need feedbackFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions