HTTP Multi-Trigger
Summary
Similar to HTTP Trigger, but accepts more than one HTTP method. Instead of choosing one method to accept this function accepts a requests using one of the following methods:
- GET,
- POST,
- PUT,
- PATCH, or
- DELETE.
This function can also be configured to authenticate requests with LoLo Auth, and only authorize certain users.
For example, it is easy to create a CRUD resource using an HTTP Multi-Trigger
Ports
An event is routed to a port when a request with a matching method is received to the route specified in Settings -> Parameters.
E.g. if the route /foo
is specified and a GET request is received for the that route, an event is produced and routed to the get
port.
If authentication and authorization is specified in Settings -> Parameters, then a request must meet those criterias before being routed.
Further, if a schema is specified, then POST, PUT, and PATCH request are validated before being routed. If the request body does not conform to the specified schema, then an error response is sent and the event is not routed.
Input/Output Format
The generated events follow the same format as the events generated by HTTP Trigger.
If authentication is turned on in Settings -> Parameters, then a session
property is assigned to the event. Consult LoLo API Auth for the format of this property.
Events
This functions listens for events named response
. Please consult the documentation for HTTP trigger for more details on this event.
Updated about 2 years ago