Make a PUT request to the API

@param string $path   The relative path for the API request. e.g. /records
@param array  $params Body of the request, will be serialized to JSON

@return array The raw response
169702
public function put($path, $params)
    {
        $response = $this->http_client->request('PUT', $path, $params);
        $this->handleErrors($response);
        return $response;
    }
430421
public static function put($url, $params) {
        $self = new self();
        if ( is_array($params) ) {
            $params = StringUtils::jsonEncode($params);
        }
        $curl = $self->_curlInit($url, array('Content-Type' => 'application/json'));
        curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
        curl_setopt($curl, CURLOPT_POSTFIELDS, $params);

        return $self->_doRequest($curl, false);
    }
531024
def table_api_put(self, *paths, **kparams):
        
        url = self.flattened_params_url("/api/now/v1/table", *paths)

        # json.dumps(kparams) is the body of the put/post
        rjson = self.req("put", url, json.dumps(kparams)).text
        return json.loads(rjson)
767639
protected function get(string $path, array $params = [], array $headers = [])
    {
        $response = $this->pureGet($path, $params, $headers);

        return ResponseMediator::getContent($response);
    }
151112
public function get($path, $params = [])
    {
        return $this->ttools->makeRequest(
            TTools::API_BASE . '/' . TTools::API_VERSION . $path,
            $params,
            'GET',
            false
        );
    }
676295
private function makeRequest($path, array $attributes)
    {
        $data = json_encode($attributes);

        return new Request(
            'POST', $path, [
            'Content-Type' => 'application/json',
            'Accept'       => 'application/json',
            'Merchant'     => $this->getMerchantId(),
            'Signature'    => $this->generateSignature($data),
        ], $data
        );
    }
1047199
protected function makeRequest($path, $requestId, array $params)
	{
		if ($this->appendId($requestId))
		{
			$path .= "/$requestId";
		}

		return $this->request($path, $params, true);
	}
1090721
public function put($path, $parameters)
    {
        $request = $this->getRequest(static::HTTP_PUT, $path, $parameters);

        return $this->sendRequest($request);
    }
3247
public function put($params = null)
    {
        $handle = $this->preparePut($params);
        return $this->curlGetResponse($handle);
    }
1013737
public function make($path = null, $params = [], $secure = false)
    {
        $this->secure = $secure;
        $params_index = strpos($path, '?');
        $query        = $params_index === false ? '' : parse_url($path, PHP_URL_QUERY);
        $path         = $params_index === false ? $path : substr($path, 0, $params_index);
        $path_params  = [];
        if ($query) {
            parse_str($query, $path_params);
        }

        $this->params = array_merge($path_params, $params);

        if (substr($path, 0, 4) === 'http') {
            $this->url = $path;
        } else {
            $scheme    = $this->secure ? 'https' : request()->getScheme();
            $site_root = request()->getHost() ? $scheme . '://' . request()->getHost() . '/' : '/';
            $this->url = $site_root . ltrim($path, '/');
        }

        return $this;
    }
715752
public function request($path, array $params = [])
	{
		if ( ! $this->guzzle instanceof Guzzle)
		{
			throw new BaseUrlException('BaseUrl was never set. Please call baseUrl($url).');
		}

		$uri      = $path.'?'.http_build_query($params);
		$response = $this->guzzle
			->get($uri, ['timeout'     => $this->timeout,
						 'http_errors' => false]);
		$body     = $response->getBody();
		$code     = $response->getStatusCode();
		$headers  = $response->getHeaders();
		if ($body instanceof Stream)
		{
			$body->seek(0);
			$content = ($body->getSize() > 0) ? $body->read($body->getSize()) : null;
		}
		else
		{
			// no content
			$content = '';
		}
		$response = new Response($content, $code, $headers);

		return $response;
	}
370540
public function get($path, $params = array())
    {
        if (is_array($params) && array_key_exists("query", $params)) {
            $params["query"] = $this->castBooleanValuesToStrings($params["query"]);
        }

        $response = $this->http_client->request('GET', $path, $params);
        $this->handleErrors($response);
        return $response;
    }
876147
private function get($path, $params = null, $headers = null)
    {
        return $this->run($path, array('method' => 'get', 'params' => $params, 'headers' => $headers));
    }
486458
public function put($path, $callback)
    {
        Argument::i()
            //argument 1 should be a string
            ->test(1, 'string')
            //argument 2 should be callable
            ->test(2, 'callable');
        
        return $this->route('put', $path, $callback);
    }
1360737
def put(path, options={}, format=format)
      respond request(:put, path, options, format)
    end
451258
public function getUrl(string $path = null, array $params = []): Uri
    {
        $pathParams = $this->getPathParams($params);
        # get the path parameters
        $queryParams = $this->getQueryParams($params);
        # get the query parameters
        $path .= !empty($pathParams) ? '/' . $pathParams : '';
        # append the rest of the path
        if (!empty($path) && $path[0] !== '/') {
            $path = '/' . $path;
        }
        return $this->uri->withPath($path)->withQuery($queryParams);
    }
361205
private function createSubfolder($path, array $params)
    {
        // Ensure the path ends in "/" and the body is empty.
        $params['Key'] = rtrim($params['Key'], '/') . '/';
        $params['Body'] = '';

        // Fail if this pseudo directory key already exists
        if ($this->getClient()->doesObjectExist(
            $params['Bucket'],
            $params['Key'])
        ) {
            return $this->triggerError("Subfolder already exists: {$path}");
        }

        return $this->boolCall(function () use ($params, $path) {
            $this->getClient()->putObject($params);
            $this->clearCacheKey($path);
            return true;
        });
    }