Clear all GET and POST parameters

Should be used to reset the request parameters if the client is
used for several concurrent requests.

@return Zend_Http_Client
490664
public function resetParameters()
    {
        // Reset parameter data
        $this->paramsGet     = array();
        $this->paramsPost    = array();
        $this->files         = array();
        $this->raw_post_data = null;

        // Clear outdated headers
        if (isset($this->headers[strtolower(self::CONTENT_TYPE)])) {
            unset($this->headers[strtolower(self::CONTENT_TYPE)]);
        }
        if (isset($this->headers[strtolower(self::CONTENT_LENGTH)])) {
            unset($this->headers[strtolower(self::CONTENT_LENGTH)]);
        }

        return $this;
    }
518517
public function getAllPostGet()
    {
        if (isset($this->request->post, $this->request->get)) {
            return array_merge($this->request->get, $this->request->post);
        }
        return $this->request->post ?? $this->request->get ?? [];
    }
265354
public function getOpenedClient()
    {
        if (!isset($this->openedClient)) {
            $this->openedClient = new \Zend\Http\Client(
                null, [
                    'adapter' => 'Zend\Http\Client\Adapter\Socket',
                    'sslverifypeer' => false,
                ]
            );
        }

        return $this->openedClient;
    }
90801
private function getHttpClient()
    {
        if ($httpClient = $this->app->config->get('swap.http_client')) {
            return $this->app[$httpClient];
        }

        return null;
    }
119481
public function passRequestData()
    {
        $this
            ->getValidator()
                ->setInputData($this
                    ->getRequest()
                        ->query
                            ->all()
                );

        $this
            ->getValidator()
                ->setInputData($this
                    ->getRequest()
                        ->request
                            ->all()
                );

        return $this;
    }
1016229
public function getHttpClient()
    {
        if (!is_object($this->_httpClient)) {
            $this->_httpClient = new Client([
                'requestConfig' => [
                    'format' => Client::FORMAT_XML
                ],
                'responseConfig' => [
                    'format' => Client::FORMAT_XML
                ],
            ]);
        }
        return $this->_httpClient;
    }
662537
public function resetRequestVariables()
    {
        $_SERVER = $this->requestCache['_SERVER'];
        $_POST = $this->requestCache['_POST'];
        $_GET = $this->requestCache['_GET'];
        $_SESSION = $this->requestCache['_SESSION'];
        $_COOKIE = $this->requestCache['_COOKIE'];
    }
1118616
public function getHttpClient()
    {
        if (is_null($this->httpClient)) {
            $this->httpClient = $this->getDefaultHttpClient();
        }

        return $this->httpClient;
    }
223682
public function clear()
    {
        $lastQuery = $this->query;
        $this->query = new Query($this->error, $lastQuery->getInitializer());
        $this->query->forceLimit($lastQuery->getLimit());
        $this->query->forceOffset($lastQuery->getOffset());

        if (!is_array($lastQuery->getResultDataType())) {
            $this->query->setResultDataType($lastQuery->getResultDataType());
        }

        return $this;
    }
865323
public function preDispatch() {
        if ($this->getRequest()->isPost()) {
            $post = $this->_getJsonRpcRequest();
            $requests = Zend_Json::decode($post, Zend_Json::TYPE_ARRAY);
            $modifiedRequests = array();
            /**
             * Check if this was a batch request. In that case the array is a plain array of
             * arrays. If not, there will be a 'jsonrpc' key in the root of the array.
             */
            $batch = !array_key_exists('jsonrpc', $requests);
            if (!$batch) {
                $requests = array($requests);
            }
            foreach ($requests as $i => $request) {
                $this->_saveRequestForModification($request, $i);
                if (array_key_exists('method', $request)) {
                    $methodParts = explode('.', $request['method']);
                    $method = array_pop($methodParts);
                    if (in_array($method, array('create', 'update', 'destroy'))) {
                        $modifyMethod = '_modifyBefore' . ucfirst($method);
                        $request = $this->{$modifyMethod}($request);
                    }
                }
                $modifiedRequests[] = $request;
            }
            if ($batch) {
                $this->getRequest()->setPost('request', Zend_Json::encode($modifiedRequests));
            } else {
                $this->getRequest()->setPost('request', Zend_Json::encode($modifiedRequests[0]));
            }
        }
        parent::preDispatch();
        $this->_toggleCache(false);
    }
972336
public function clear()
    {
        $this->status = 200;
        $this->reasonPhrase = '';
        $this->headers = [];
        $this->ucHeaders = [];
        $this->cookies = [];
        $this->body = null;
        $this->asgiMap = [];

        return $this;
    }
571513
protected function fetchData()
    {
        $uri = $this->getUri();
        if (!$uri) {
            return;
        }

        $client = new \Zend\Http\Client($this->getUri());
        $client->setMethod('GET');

        try {
            $response = $client->send();
        } catch (\Exception $e) {
            return;
        }

        $status = $response->getStatusCode();
        if ($status == 200) {
            $result = $response->getBody();
            $result = (array) json_decode($result);
            if (0 < count($result)) {
                $name = array_pop($result);
                $this->setName($name);
            }
        }
    }
566715
public function reset()
    {
        $reflection = new \ReflectionClass(static::class);
        foreach ($reflection->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
            if (!$property->isStatic()) {
                $this->{$property->getName()} = null;
            }
        }
        return $this;
    }
187322
function clear() {
        if($this !== $this->client->channels) {
            foreach($this->data as $key => $val) {
                $this->client->channels->delete($key);
                unset($val);
            }
        }
        
        parent::clear();
        return $this;
    }
71174
public function createClient($url = null,
        $method = \Zend\Http\Request::METHOD_GET, $timeout = null
    ) {
        $client = new \Zend\Http\Client();
        $client->setMethod($method);
        if (!empty($this->defaults)) {
            $client->setOptions($this->defaults);
        }
        if (null !== $this->defaultAdapter) {
            $client->setAdapter($this->defaultAdapter);
        }
        if (null !== $url) {
            $client->setUri($url);
        }
        if ($timeout) {
            $client->setOptions(['timeout' => $timeout]);
        }
        $this->proxify($client);
        return $client;
    }
981577
public function reset(): ApiClient
    {
        $this->internalRequest = new InternalRequest($this->baseUrl, 'GET');
        $this->request = null;
	$this->response = null;

        $this->profiler = false;

        $this->hasPerformedRequest = false;
        $this->kernel->shutdown();
        $this->kernel->boot();

        return $this;
    }
37237
public function clear () {
        $this->_data = null;
        $this->_count = null;
        $this->getConnection ()->getClient ()->delete ($this->name);
        return $this;
    }