Events

httpRequest

Make http requests without code.


Options

  • target <string> specifies the target of the http request.
  • method <string> the http method to use. GET/POST/PUT/DELETE
  • body <string, optional> the body of a POST/PUT request.
  • responseSelector <string, optional> a selector query of which to replace the innerHTML with the response of the request. Uses document.querySelectorAll internally.

Methods

  • :trigger triggers the http request.

Example

{
    "$exampleEvent": {
        "type": "httpRequest",
        "target": "https://example.com/",
        "method": "POST",
        "body": {
            "id": 1,
            "name": "Lorem ipsum"
        },
        "responseSelector": "#result"
    }
}