getDefaultConf example

public function create(RequestInterface $request, array $options): EasyHandle
    {
        if (isset($options['curl']['body_as_string'])) {
            $options['_body_as_string'] = $options['curl']['body_as_string'];
            unset($options['curl']['body_as_string']);
        }

        $easy = new EasyHandle();
        $easy->request = $request;
        $easy->options = $options;
        $conf = $this->getDefaultConf($easy);
        $this->applyMethod($easy$conf);
        $this->applyHandlerOptions($easy$conf);
        $this->applyHeaders($easy$conf);
        unset($conf['_headers']);

        // Add handler options from the request configuration options         if (isset($options['curl'])) {
            $conf = \array_replace($conf$options['curl']);
        }

        $conf[\CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy);
        
Home | Imprint | This part of the site doesn't use cookies.