<commit_before>// Copyright (c) 2015, <NAME>. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

library dart_mvc.request;

import 'dart:io';

/**
 * The request wrapper
 */
class Request {
  HttpRequest _req;

  Request(this._req);

  /**
   * get request parameters
   */
  void input(String name) {
    throw UnimplementedError;
  }
}<commit_msg>add basic implementation of Request.input<commit_after>// Copyright (c) 2015, <NAME>. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

library dart_mvc.request;

import 'dart:io';

/**
 * The request wrapper
 */
class Request {
  HttpRequest _req;

  Request(this._req);

  /**
   * get request parameters
   */
  String input(String name) {
    var result;
    var queries = _req.uri.queryParameters;
    if (queries.containsKey(name)) {
      result = queries[name];
    }
    // TODO - parse data from POST requests
    return result;
  }
}
{'fraction_non_alphanumeric': 0.10789980732177264, 'fraction_numerical': 0.007707129094412331, 'mean_word_length': 3.074509803921569, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2184186', 'n_tokens_mistral': 327, 'n_tokens_neox': 310, 'n_words': 113}