public function set_response($body, $status, $mime = null, $headers = array(), $accept_header = null)
	{
		// did we use an accept header? If so, validate the returned mimetype
		if ( ! $this->mime_in_header($mime, $accept_header))
		{
			throw new \OutOfRangeException('The mimetype "'.$mime.'" of the returned response is not acceptable according to the accept header send.');
		}

		// do we have auto formatting enabled and can we format this mime type?
		if ($this->auto_format and array_key_exists($mime, static::$auto_detect_formats))
		{
			$body = \Format::forge($body, static::$auto_detect_formats[$mime])->to_array();
		}

		$this->response = \Response::forge($body, $status, $headers);

		return $this->response;
	}