HttpContext.fromRequest constructor
HttpContext.fromRequest(
- ServerMessage msg
Create a HTTP context from a server message.
Implementation
HttpContext.fromRequest($ap.ServerMessage msg)
: this(
msg.id,
HttpRequest(
body: utf8.decode(msg.httpRequest.body),
method: msg.httpRequest.method,
path: msg.httpRequest.path,
pathParams: msg.httpRequest.pathParams,
queryParams: msg.httpRequest.queryParams
.map((key, value) => MapEntry(key, value.value)),
headers: msg.httpRequest.headers
.map((key, value) => MapEntry(key, value.value)),
),
HttpResponse(),
);