Empty current response

@return Reponse
542157
public function reset()
    {
        $this->contentLength = 0;
        $this->data = "";
        $this->headers = [];
        $this->status = 200;

        return $this;
    }
1053613
public function reset()
    {
        $this->last_response_headers = array();
        $this->last_info = array();
        $this->last_curl_errno = 0;
        $this->last_curl_error = '';

        return $this;
    }
1317807
public function reload()
    {
        $id = $this->getRecordIdent();
        $this->dataReset();
        $this->loadFromFlexiBee($id);
        return $this->lastResponseCode == 200;
    }
407127
public function getResponse() {
		if($this->response)
			return $this->response;
		else
			return new \Asgard\Http\Response($this->code);
	}
1281963
protected function notFoundResponse()
    {
        $content = ['error' => "Resource not found."];

        return (request()->ajax() || request()->wantsJson())
            ? new JsonResponse($content, 404)
            : new Response($content, 404);
    }
50218
public function generate(): Response
    {
        $this->addDefaultRules();

        $content = self::COMMENT;

        foreach ($this->collection->getUserAgentRules() as $userAgentRule) {
            $content .= PHP_EOL . 'User-agent: ' . $userAgentRule->getName() . PHP_EOL;

            foreach ($userAgentRule->getDisallow() as $disallow) {
                $content .= 'Disallow: ' . $disallow . PHP_EOL;
            }

            foreach ($userAgentRule->getAllow() as $allow) {
                $content .= 'Allow: ' . $allow . PHP_EOL;
            }
        }

        foreach ($this->collection->getSiteMaps() as $sitemap) {
            $content .= PHP_EOL . 'Sitemap: ' . $this->host . $sitemap;
        }

        return new Response($content, Response::HTTP_OK, ['Content-Type' => 'text/plain']);
    }
18050
public function respond()
    {
        $response = array();

        foreach ($this->queue as $object) {
            $response[] = $object->render();
        }

        return array('ajaxcom' => $response);
    }
884796
public function validate()
    {
        try {
            $httpResponse = $this->getClient()->request(
                'GET',
                sprintf("developer/%s/user/%s/receiptId/%s", $this->_developerSecret, $this->_userId, $this->_receiptId)
            );

            return new Response($httpResponse->getStatusCode(), json_decode($httpResponse->getBody(), true));
        } catch (RequestException $e) {
            if ($e->hasResponse()) {
                return new Response(
                    $e->getResponse()->getStatusCode(), json_decode($e->getResponse()->getBody(), true)
                );
            }
        }

        return new Response(Response::RESULT_INVALID_RECEIPT);
    }
519302
public function prompt()
    {
        $this->writePrompt();

        $response = $this->valueOrDefault($this->getUserInput());

        if ($this->isValidResponse($response)) {
            return $response;
        }

        return $this->prompt();
    }
77692
public function getStatus()
	{
		$response = $this->parent->send(new Request($this->uri->withPath($this->uri->getPath().'operations/'
			.$this->getIdentifier()), 'GET'));

		if ($response->getStatusCode() == 200)
		{
			$response = json_decode($response->getBody(), true);

			if (isset($response['status']))
			{
				return $response['status'];
			}
		}

		return null;
	}
817135
public function getResponse()
    {
        if (! $this->_response instanceof LibBaseDispatcherResponse) {
            $this->_response = parent::getResponse();

            if (! $this->_response instanceof LibBaseDispatcherResponse) {
                throw new InvalidArgumentException(
                    'Response: '.get_class($this->_response).' must be an intance of LibBaseDispatcherResponse'
                );
            }

            $this->_response->setRequest($this->getRequest());
        }

        return $this->_response;
    }
920950
public function getBaseResponse()
    {
        if (!isset($this->baseResponse)) {
            $this->baseResponse = new Response();
        }
        
        $response = $this->baseResponse;
        
        if ($response instanceof GlobalEnvironmentInterface && $response->isStale() === false) {
            $response = $response->withGlobalEnvironment(true); // Make sure base response is stale
        }
        
        return $response;
    }
744140
public function getResult()
    {
        if (!$this->isDone() || is_null($this->lastProtoResponse->getResponse())) {
            return null;
        }

        /** @var Any $anyResponse */
        $anyResponse = $this->lastProtoResponse->getResponse();
        if (is_null($this->operationReturnType)) {
            return $anyResponse;
        }
        $operationReturnType = $this->operationReturnType;
        /** @var Message $response */
        $response = new $operationReturnType();
        $response->mergeFromString($anyResponse->getValue());
        return $response;
    }
86301
public function flushAction()
    {
        $helper = new FlushCatalogueCacheHelper($this->cacheDir);
        $removedCount = $helper();

        $response = [
            'info' => sprintf('Looking in %s', $this->cacheDir),
            'message' => sprintf('OK (%d cache items removed)', $removedCount),
        ];

        return new JsonResponse($response);
    }
973060
public function allAction()
    {
        $repository = $this->container->get('request')->get('repository');
        $response = new JsonResponse();

        if (!$this->isValidRepositoryName($repository)) {
            $response->setData(array('msg' => 'Package not found. Please check the package name. eg. (symfony/symfony)'));
            $response->setStatusCode(404);

            return $response;
        }

        try {
            $badges = $this->container->get('snippet_generator')->generateAllSnippets($repository);
            $response->setData($badges);
        } catch (ClientErrorResponseException $e) {
            $response->setData(array('msg' => 'Package not found. Please check the package name. eg. (symfony/symfony)'));
            $response->setStatusCode(404);
        } catch (\Exception $e) {
            $response->setData(array('msg' => 'Server Error'));
            $response->setStatusCode(500);
        }

        return $response;
    }
1170801
public function toResponse(): Response
    {
        $base = [
            'return_code' => is_null($this->fail) ? static::SUCCESS : static::FAIL,
            'return_msg' => $this->fail,
        ];

        $attributes = array_merge($base, $this->attributes);

        if ($this->sign) {
            $attributes['sign'] = Support\generate_sign($attributes, $this->app->getKey());
        }

        return new Response(XML::build($attributes));
    }
1206501
function start()
	{
		$originalProps = $this->props;		
		$response = new ET_Perform($this->authStub, $this->obj, 'start', $this->props);
		if ($response->status) {
			$this->lastTaskID = $response->results[0]->Task->ID;
		}
		$this->props = $originalProps;
		return $response;
	}