buildHandshake method

Map buildHandshake(
  1. dynamic query
)

Implementation

Map buildHandshake(query) {
  Map buildQuery() {
    var requestQuery = request.uri.queryParameters;
    return query != null
        ? (Map.from(query)..addAll(requestQuery))
        : requestQuery;
  }

  return {
    'headers': request.headers,
    'time': DateTime.now().toString(),
    'address': conn.remoteAddress,
    'xdomain': request.headers.value('origin') != null,
    'issued': DateTime.now().millisecondsSinceEpoch,
    'url': request.uri.path,
    'query': buildQuery()
  };
}