fromResponse static method

Future<NextInvocation> fromResponse(
  1. Response response
)

Digesting a HttpClientResponse into a NextInvocation.

Implementation

static Future<NextInvocation> fromResponse(http.Response response) async =>
    NextInvocation(
        response: (json.decode(utf8.decode(response.bodyBytes)) as Map)
            .cast<String, dynamic>(),
        requestId: response.headers[runtimeRequestId]!,
        deadlineMs: response.headers[runtimeDeadlineMs],
        invokedFunctionArn: response.headers[runtimeInvokedFunctionArn],
        traceId: response.headers[runtimeTraceId],
        clientContext: response.headers[runtimeClientContext],
        cognitoIdentity: response.headers[runtimeCognitoIdentity]);