| Index: runtime/bin/vmservice/service_request.dart
|
| diff --git a/runtime/bin/vmservice/service_request.dart b/runtime/bin/vmservice/service_request.dart
|
| deleted file mode 100644
|
| index 8d7eb521e6298112ac8c724efd4f11c09e10f4ea..0000000000000000000000000000000000000000
|
| --- a/runtime/bin/vmservice/service_request.dart
|
| +++ /dev/null
|
| @@ -1,52 +0,0 @@
|
| -// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| -// for details. All rights reserved. Use of this source code is governed by a
|
| -// BSD-style license that can be found in the LICENSE file.
|
| -
|
| -part of vmservice;
|
| -
|
| -class ServiceRequest {
|
| - final List<String> pathSegments = new List<String>();
|
| - final Map<String, String> parameters = new Map<String, String>();
|
| - String _response;
|
| - String get response => _response;
|
| -
|
| - ServiceRequest();
|
| -
|
| - bool parse(Uri uri) {
|
| - var path = uri.path;
|
| - var split = path.split('/');
|
| - if (split.length == 0) {
|
| - setErrorResponse('Invalid request uri: ${request.uri}');
|
| - return false;
|
| - }
|
| - for (int i = 0; i < split.length; i++) {
|
| - var pathSegment = split[i];
|
| - if (pathSegment == '') {
|
| - continue;
|
| - }
|
| - pathSegments.add(pathSegment);
|
| - }
|
| - uri.queryParameters.forEach((k, v) {
|
| - parameters[k] = v;
|
| - });
|
| - return true;
|
| - }
|
| -
|
| - List toServiceCallMessage() {
|
| - return [pathSegments, parameters.keys.toList(), parameters.values.toList()];
|
| - }
|
| -
|
| - void setErrorResponse(String error) {
|
| - _response = JSON.encode({
|
| - 'type': 'Error',
|
| - 'msg': error,
|
| - 'pathSegments': pathSegments,
|
| - 'parameters': parameters
|
| - });
|
| - }
|
| -
|
| - void setResponse(String response) {
|
| - _response = response;
|
| - }
|
| -
|
| -}
|
|
|