createWebEvent function

Event createWebEvent(
  1. Spry app,
  2. Request request
)

Create a new Event for web.

Implementation

Event createWebEvent(Spry app, web.Request request) {
  final spryRequest = Request(
    method: request.method.toUpperCase(),
    uri: Uri.parse(request.url),
    headers: toSpryHeaders(request.headers),
    body: _getWebRequestBody(request),
  );

  return createEvent(app, spryRequest);
}