<commit_before><?php
/* This class is part of the XP framework
 *
 * $Id$
 */

  /**
   * REST response
   *
   * @test  xp://net.xp_framework.unittest.rest.srv.ResponseTest
   */
  class Response extends Object {
    public $status;
    public $headers= array();
    public $payload;

    /**
     * Creates a new response instance
     *
     * @param  int status
     */<commit_msg>- QA: Test and document webservices.rest.srv.Response class<commit_after><?php
/* This class is part of the XP framework
 *
 * $Id$
 */

  /**
   * The Response class can be used to control the HTTP status code and headers
   * of a REST call.
   *
   * <code>
   *   #[@webservice(path= '/resources', method= 'POST')]
   *   public function addElement(Element $element) {
   *     // TBI: Create element
   *     return Response::created();
   *   }
   * </code>
   *
   * @test  xp://net.xp_framework.unittest.rest.srv.ResponseTest
   */
  class Response extends Object {
    public $status;
    public $headers= array();
    public $payload;

    /**
     * Creates a new response instance
     *
     * @param  int status
     */
{'fraction_non_alphanumeric': 0.129695885509839, 'fraction_numerical': 0.0, 'mean_word_length': 2.3106508875739644, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1886606', 'n_tokens_mistral': 356, 'n_tokens_neox': 345, 'n_words': 103}