Issue an HTTP PUT request with the data provided

@throws Exception

@param string $url  - PUT URL
@param string $data - body to post
@param array  $customHeaders

@return HttpResponse
760900
public function put($url, $data, array $customHeaders = [])
    {
        return $this->handleFailover(function() use ($url, $data, $customHeaders) {
            $response = $this->executeRequest(HttpHelper::METHOD_PUT, $url, $data, $customHeaders);

            return $this->parseResponse($response);
        });
    }
640043
protected function submitRequest($url, $headers, $data = null, $httpVerb = 'POST', $keyType = HpsServicesConfig::KEY_TYPE_SECRET, $options = null)
    {
        if ($this->_isConfigInvalid()) {
            throw new HpsAuthenticationException(
                HpsExceptionCodes::INVALID_CONFIGURATION,
                "The HPS SDK has not been properly configured. "
                ."Please make sure to initialize the config "
                ."in a service constructor."
            );
        }

        if (!$this->_config->validate($keyType) && ($this->_config->username == null && $this->_config->password == null)) {
            $type = $this->_config->getKeyType($keyType);
            $message = "The HPS SDK requires a valid {$keyType} API key to be used";
            if ($type == $keyType) {
                $message .= ".";
            } else {
                $message .= ", but a(n) {$type} key is currently configured.";
            }
            throw new HpsAuthenticationException(
                HpsExceptionCodes::INVALID_CONFIGURATION,
                $message
            );
        }

        $logger = HpsLogger::getInstance();

        try {
            $request = curl_init();
            curl_setopt($request, CURLOPT_URL, $url);
            curl_setopt($request, CURLOPT_CONNECTTIMEOUT, 100);
            curl_setopt($request, CURLOPT_TIMEOUT, 100);
            curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);
            curl_setopt($request, CURLOPT_SSL_VERIFYHOST, false);
            if ($data != null) {
                $logger->log('Request data', $data);
                curl_setopt($request, CURLOPT_CUSTOMREQUEST, $httpVerb);
                curl_setopt($request, CURLOPT_POSTFIELDS, $data);
            }
            $logger->log('Request headers', $headers);
            curl_setopt($request, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($request, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);

            if ($this->_config->useProxy) {
                curl_setopt($request, CURLOPT_PROXY, $this->_config->proxyOptions['proxy_host']);
                curl_setopt($request, CURLOPT_PROXYPORT, $this->_config->proxyOptions['proxy_port']);
            }

            if (
                $this->_config->curlOptions != null
                && !empty($this->_config->curlOptions)
            ) {
                curl_setopt_array($request, $this->_config->curlOptions);
            }

            $curlResponse = curl_exec($request);
            $curlInfo = curl_getinfo($request);
            $curlError = curl_errno($request);

            $logger->log('Response data', $curlResponse);
            $logger->log('Curl info', $curlInfo);
            $logger->log('Curl error', $curlError);

            if ($curlError == 28) { //CURLE_OPERATION_TIMEOUTED
                throw new HpsException("gateway_time-out");
            }

            if ($curlError == 35) { //CURLE_SSL_CONNECT_ERROR
                $err_msg = 'PHP-SDK cURL TLS 1.2 handshake failed. If you have any questions, please contact Specialty Products Team at 866.802.9753.';
                if ( extension_loaded('openssl') && OPENSSL_VERSION_NUMBER <  self::MIN_OPENSSL_VER ) { // then you don't have openSSL 1.0.1c or greater
                    $err_msg .= 'Your current version of OpenSSL is ' . OPENSSL_VERSION_TEXT . 'You do not have the minimum version of OpenSSL 1.0.1c which is required for curl to use TLS 1.2 handshake.';
                }
                throw new HpsGatewayException($curlError,$err_msg);
            }
            return $this->processResponse($curlResponse, $curlInfo, $curlError);
        } catch (Exception $e) {
            throw new HpsGatewayException(
                $e->getCode() != null ? $e->getCode() : HpsExceptionCodes::UNKNOWN_GATEWAY_ERROR,
                $e->getMessage() != null ? $e->getMessage() : 'Unable to process transaction',
                null,
                null,
                $e
            );
        }
    }
607187
public function put($uri,array $headers,$body)
        {
            return $this->prepareRequest(self::PUT,$uri,$headers,$body);
        }
1144625
public function get($url, array $data = [], array $headers = [])
    {
        $url = $this->optionParser->parseUrl($url, $data);

        $this->unsetOption(CURLOPT_POST);

        $this->setOptions([
            CURLOPT_CUSTOMREQUEST => 'GET',
            CURLOPT_HTTPGET => true
        ]);

        return $this->send($url, [], $headers);
    }
649145
public function get($url, array $data = [], array $headers = [])
    {
        if ($data) {
            $url .= '?' . http_build_query($data);
        }
        return $this->sendRequest('GET', $url, $headers);
    }
665454
public function put($url, array $data = [])
    {
        $this->resetAndAssociateUrl($url);

        if (!curl_setopt($this->ch, CURLOPT_PUT, true)) {
            $this->addFields($data);
        }

        return new Parser($this->ch);
    }
1117415
public static function post($url, $dataArray, $httpHeaders = array())
    {
        self::prepareRequest($httpHeaders, $dataArray);

        $response = CurlRequest::post($url, self::$postDataJSON, self::$httpHeaders);

        return self::processResponse($response);
    }
1327942
public function put($url, array $data = [])
    {
        $this->setopt(CURLOPT_URL, $url.'?'.http_build_query($data));
        $this->setopt(CURLOPT_CUSTOMREQUEST, 'PUT');
        $this->_exec();
    }
336564
public function addHead($url, $data = array())
    {
        if (is_array($url)) {
            $data = $url;
            $url = $this->baseUrl;
        }
        $curl = new Curl();
        $curl->setURL($url, $data);
        $curl->setOpt(CURLOPT_CUSTOMREQUEST, 'HEAD');
        $curl->setOpt(CURLOPT_NOBODY, true);
        $this->addHandle($curl);
        return $curl;
    }
407547
public function put($url, $params, $options = [], $headers = []) {
        return $this->update('put', $url, $params, $options, $headers);
    }
729364
public function post($url, $data = array())
    {
        $this->setOpt(CURLOPT_URL, $url);
        $this->preparePayload($data);
        $this->exec();
        return $this;
    }
1168827
def put(self, url, data, headers=None):
        
        return self._request('PUT', url, data, headers=headers)
1247033
public function patch($url, $data = array())
    {
        if (is_array($url)) {
            $data = $url;
            $url = $this->baseUrl;
        }

        if (is_array($data) && empty($data)) {
            $this->removeHeader('Content-Length');
        }

        $this->setUrl($url);
        $this->setOpt(CURLOPT_CUSTOMREQUEST, 'PATCH');
        $this->setOpt(CURLOPT_POSTFIELDS, $this->buildPostData($data));
        return $this->exec();
    }
513311
def _put_request(self, url, headers, data=None):
        
        return self._session.put(url, headers=headers, data=data)
598429
public static function post($url, array $data = [], array $headers = [])
    {
        // $headers = [ 'Content-Type: application/json' ];

        $ch = curl_init();

        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // 发送数据
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

        // 执行HTTP请求
        return self::execute($ch);
    }
579971
public static function post($url, $data = [], $options = [])
    {
        $options['data'] = $data;
        return self::doRequest('post', $url, $options);
    }
510938
public function delete(String $url = NULL, $data = NULL)
    {
        return $this->_customRequest($url, $this->data ?? $data, __FUNCTION__);
    }