Set the response request.

@param array $request
499943
public function setRequest($request)
    {
        if (! $request instanceof LibBaseControllerRequest) {
            $request = new LibBaseControllerRequest($request);
        }

        $this->_request = $request;

        return $this;
    }
1145697
public function send(Request $request): Response
    {
        $this->serialInterface->send($request->encode());
        return $this->receiveResponse($request->getTimeout());
    }
503662
public function run($request)
    {
        $name = get_class($this);
        $verbose = $request->getVar('verbose');

        // Set new logger
        $logger = $this
            ->getLoggerFactory()
            ->getOutputLogger($name, $verbose);
        $this->setLogger($logger);
    }
603401
private function cors($request)
  {
    $origin  = $request->server->http_origin;
    $allowed = Config::get('cors.allowedOrigins');

    if (in_array('*', $allowed) || in_array($origin, $allowed) ) {
      $this->withHeaders($request);
    }
  }
1261442
public function handleClientRequest($request)
    {
        $this->client_data->path = $request->server['path_info'];
        $route = explode('/', $request->server['path_info']);
        $count = count($route);
        if ($count == 2) {
            $this->client_data->controller_name = $route[$count - 1] ?? null;
            $this->client_data->method_name = null;
            return;
        }
        $this->client_data->method_name = $route[$count - 1] ?? null;
        unset($route[$count - 1]);
        unset($route[0]);
        $this->client_data->controller_name = implode("\\", $route);
    }
885273
public function handleSettings(array $request = [])
    {
        $validator = new \Valitron\Validator($request);
        $validator->rule('required', ['enabled', 'title', 'email']);
        $validator->rule('optional', ['description', 'logo']);
        $validator->rule(function ($field, $value, array $params, array $fields) {
            return is_string($value);
        }, ['title', 'description'])->message("{field} must be a string");
        $validator->rule('email', 'email');
        $validator->rule(function ($field, $value, array $params, array $fields) {
            return in_array($value, [0, 1]);
        }, 'enabled')->message("{field} must be a either yes or no");
        $validator->rule(function ($field, $value, array $params, array $fields) {
            return file_exists(rtrim(public_path(), '/') . $value) || (filter_var($value, FILTER_VALIDATE_URL) !== false);
        }, 'logo')->message("{field} must be an external link or a local file path");
        if ($validator->validate() === false) {
            if (headers_sent() === false) {
                header('X-PHP-Response-Code: 422', true, 422);
            }
            return $this->templates->render("Main::Settings", [
                "messages" => [
                    'error' => $validator->errors(),
                    'info' => '',
                    'success' => '',
                    'warning' => ''
                ],
                "site" => $this->core->site()
            ]);
        }

        $response = $this->core->api('Setting/1', 'PUT')->run([
            "value" => (bool) $request['enabled']
        ]);
        if ($response["headers"][0][2] === 422) {
            if (headers_sent() === false) {
                foreach ($response["headers"] as $header) {
                    header($header[0], $header[1], $header[2]);
                }
            }
            return $this->templates->render("Main::Settings", [
                "messages" => [
                    'error' => $response['response'],
                    'info' => '',
                    'success' => '',
                    'warning' => ''
                ],
                "site" => $this->core->site()
            ]);
        } elseif (($response["headers"][0][2] - 200) * ($response["headers"][0][2] - 299) > 0) {
            if (headers_sent() === false) {
                foreach ($response["headers"] as $header) {
                    header($header[0], $header[1], $header[2]);
                }
            }
            return $this->templates->render("500", [
                "error" => $response['response'],
                "result" => ''
            ]);
        }

        $response = $this->core->api('Setting/2', 'PUT')->run([
            "value" => $request['title']
        ]);
        if ($response["headers"][0][2] === 422) {
            if (headers_sent() === false) {
                foreach ($response["headers"] as $header) {
                    header($header[0], $header[1], $header[2]);
                }
            }
            return $this->templates->render("Main::Settings", [
                "messages" => [
                    'error' => $response['response'],
                    'info' => '',
                    'success' => '',
                    'warning' => ''
                ],
                "site" => $this->core->site()
            ]);
        } elseif (($response["headers"][0][2] - 200) * ($response["headers"][0][2] - 299) > 0) {
            if (headers_sent() === false) {
                foreach ($response["headers"] as $header) {
                    header($header[0], $header[1], $header[2]);
                }
            }
            return $this->templates->render("500", [
                "error" => $response['response'],
                "result" => ''
            ]);
        }

        $response = $this->core->api('Setting/3', 'PUT')->run([
            "value" => $request['description']
        ]);
        if ($response["headers"][0][2] === 422) {
            if (headers_sent() === false) {
                foreach ($response["headers"] as $header) {
                    header($header[0], $header[1], $header[2]);
                }
            }
            return $this->templates->render("Main::Settings", [
                "messages" => [
                    'error' => $response['response'],
                    'info' => '',
                    'success' => '',
                    'warning' => ''
                ],
                "site" => $this->core->site()
            ]);
        } elseif (($response["headers"][0][2] - 200) * ($response["headers"][0][2] - 299) > 0) {
            if (headers_sent() === false) {
                foreach ($response["headers"] as $header) {
                    header($header[0], $header[1], $header[2]);
                }
            }
            return $this->templates->render("500", [
                "error" => $response['response'],
                "result" => ''
            ]);
        }

        $response = $this->core->api('Setting/4', 'PUT')->run([
            "value" => $request['email']
        ]);
        if ($response["headers"][0][2] === 422) {
            if (headers_sent() === false) {
                foreach ($response["headers"] as $header) {
                    header($header[0], $header[1], $header[2]);
                }
            }
            return $this->templates->render("Main::Settings", [
                "messages" => [
                    'error' => $response['response'],
                    'info' => '',
                    'success' => '',
                    'warning' => ''
                ],
                "site" => $this->core->site()
            ]);
        } elseif (($response["headers"][0][2] - 200) * ($response["headers"][0][2] - 299) > 0) {
            if (headers_sent() === false) {
                foreach ($response["headers"] as $header) {
                    header($header[0], $header[1], $header[2]);
                }
            }
            return $this->templates->render("500", [
                "error" => $response['response'],
                "result" => ''
            ]);
        }

        $response = $this->core->api('Setting/5', 'PUT')->run([
            "value" => $request['logo']
        ]);
        if (headers_sent() === false) {
            foreach ($response["headers"] as $header) {
                header($header[0], $header[1], $header[2]);
            }
        }
        if ($response["headers"][0][2] === 422) {
            return $this->templates->render("Main::Settings", [
                "messages" => [
                    'error' => $response['response'],
                    'info' => '',
                    'success' => '',
                    'warning' => ''
                ],
                "site" => $this->core->site()
            ]);
        } elseif (($response["headers"][0][2] - 200) * ($response["headers"][0][2] - 299) <= 0) {
            return $this->templates->render("Main::Settings", [
                "messages" => [
                    'error' => '',
                    'info' => '',
                    'success' => 'Details changed successfully.',
                    'warning' => ''
                ],
                "site" => $this->core->site()
            ]);
        } else {
            return $this->templates->render("500", [
                "error" => $response['response'],
                "result" => ''
            ]);
        }
    }
346632
public function setRequest(Request $request)
    {
        $this->setParam('request', $request);
        $this->request = $request;
        return $this;
    }
16928
public function loadDataFromRequest(array $request)
    {
        foreach ($request as $key => $value) {
            if (in_array($key, $this->requestVariables)) {
                $this->data[$key] = $value;
            }
        }
    }
167884
private function setRequest(Request $request = null)
    {
        $this->request = $request;
        $this->override = null;
    }
152456
private function setRequest(Request $request)
    {
        $this->mergeVisitorActivityData([
            'method'      => $request->method(),
            'is_ajax'     => $request->ajax(),
            'is_secure'   => $request->isSecure(),
            'is_json'     => $request->isJson(),
            'wants_json'  => $request->wantsJson(),
        ]);

        $this->request = $request;

        return $this;
    }
1320327
public function setRequest(\OxidEsales\PayPalModule\Model\PayPalRequest\PayPalRequest $request)
    {
        $this->setParameters($request->getData());
    }
687762
public function run($request = null)
    {
        $response = $this->dispatch($request);

        if ($response instanceof SymfonyResponse) {
            $response->send();
        } else {
            echo (string) $response;
        }

        if (count($this->middleware) > 0) {
            $this->callTerminableMiddleware($response);
        }
    }
800963
private function executeRequest(string $request): Response
    {
        $response = $this->transport->executeRequest($this->config['endpoint_uri'], $request);

        return new Response($response);
    }
782264
public function setRequest(array $request)
    {
        $this->_request = new LibBaseControllerRequest();

        foreach ($request as $key => $value) {
            $this->_request->$key = $value;
            $this->$key = $value;
        }

        return $this;
    }
93107
public function setRequest(SimplifiedRequest $request)
    {
        if (!$this->key) {
            $this->setMapKey($request->host);
        }

        parent::setRequest($request);
    }
938351
protected function doRequest($request)
    {
        //Basic curl setup for SOAP call
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $this->curlOptions['url']);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLINFO_HEADER_OUT, 1);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
        curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
        curl_setopt($ch, CURLOPT_TIMEOUT, 30);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);

        //SSL
        curl_setopt($ch, CURLOPT_CAINFO, $this->curlOptions['caInfo']);
        curl_setopt($ch, CURLOPT_SSLVERSION, 'CURL_SSLVERSION_TLSv1');
        curl_setopt($ch, CURLOPT_SSLCERT, $this->curlOptions['sslCert']);
        curl_setopt($ch, CURLOPT_SSLKEY, $this->curlOptions['sslKey']);
        curl_setopt($ch, CURLOPT_SSLKEYPASSWD, $this->curlOptions['sslKeyPasswd']);
        curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
        curl_setopt($ch, CURLOPT_USERPWD, sprintf('%1$s:%2$s', $this->username, $this->password));

        $response               = curl_exec($ch);
        $this->curlErrorNumber  = curl_errno($ch);

        if ($this->curlErrorNumber == CURLE_OK) {
            $this->curlStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        }
        $this->curlErrorMsg  = curl_error($ch);

        //Close connection
        curl_close($ch);

        //Return response info
        return $response;
    }
1164381
public function authenticate($request) {
		if(!$this->configured)
			return;
		
		$this->checkValidity();
		
		if($this->via == self::HTTP_HEADER)
			$request->addHeader($this->description->http_header, $this->token);
	}