HTTP Connector

Handle HTTP requests events for Reshuffle.

Events:

request Handle HTTP request

Event Details

Request event

Event parameters:

method: string - HTTP request method
path: string - URL path prefix

Handler inputs:

event.req: object - Express request object
event.res: object - Express response object

Example:

async (event) => {
  event.context.res.status(200).send('Ok');
}

Create API endpoint by handling HTTP requests. This event can be used to create REST or other types of HTTP based APIs.

The handler function is an Express framework handler. It receives standard Express request and response object. The response object is also used to formulate the HTTP response to the caller.