PUT method.
@param path
@param data
@return response from API.
550062
public String put(String path, Response data) {
		return request("PUT", path, data, getDefaultOptions());
	}
433134
function put(path, val) {
  var pos = splitPath(path).reduce(function (t, segment) {
    if (!t[segment]) { t[segment] = {} }
    return t[segment]
  }, this)
  pos['@'] = val;
  return this;
}
994089
private function putFile($path, $data)
    {
        $info = false;
        $url = parse_url($path);

        $fp = fsockopen($url['host'], $url['port'], $errno, $errstr, 5);
        if (!$fp) {
            return false;
        }

        $buffer = '';
        $b = "\r\n";

        stream_set_blocking($fp, true);
        stream_set_timeout($fp, 30, 200000);

        $out = 'PUT '.$url['path'].' HTTP/1.1'.$b;
        $out .= 'Host: '.$url['host'].$b;
        $out .= 'Content-Length: '.Util\Size::fromContent($data).$b.$b;
        $out .= $data;
        $out .= $b.$b;
        fwrite($fp, $out);
        fflush($fp);

        stream_set_blocking($fp, true);
        stream_set_timeout($fp, 30, 200000);

        while (!feof($fp) && !$info['timed_out']) {
            $info = stream_get_meta_data($fp);
            $buffer .= fgets($fp, 128);
        }
        fclose($fp);

        return true;
    }
767982
protected String create(String path, byte[] data) {
        try {
            return getClient().create().creatingParentsIfNeeded().forPath(path, data);
        } catch (Exception e) {
            throw new NiubiException(e);
        }
    }
899221
public Response<File> toFileResponse(Path path) {
        File file = path.toFile();
        this.writeToFile(file);
        return new Response<>(this.url, this.statusCode, this.cookies, this.headers, file);
    }
536469
public void put(String fromPath, String toPath, Status status) {
        http.put(fromPath, redirectRoute(toPath, status));
    }
210479
def put(path: nil, payload:, headers: {}, query: {})
      execute(method: :put, path: path, headers: headers, query: query, payload: payload)
    end
1166763
protected ListenableFuture<Boolean> setData(String path, byte[] data, boolean overwrite) {
    final SettableFuture<Boolean> future = SettableFuture.create();
    boolean ret = FileUtils.writeToFile(path, data, overwrite);
    safeSetFuture(future, ret);

    return future;
  }
507881
public function put($path, $params = []){
        $json = json_encode($params);
        
        return $this->_call('PUT', $path, $json);
    }
340492
public RestResponse put(final String uri, final Map<String, Object> params) throws IOException,
            AppPlatformException {
        return request(getPath(uri), HttpPut.METHOD_NAME, params);
    }
76661
public function put(string $path, array $query = [], array $body = []): ResponseInterface
    {
        return $this->request('PUT', $path, $query, $body);
    }
67262
def post(self, path, data):
        
        LOGGER.debug('Posting data: %r', data)
        return self.session.post(self._request_url(path),
                                 data=json.dumps(data or {}),
                                 headers=self.HEADERS, auth=self.auth,
                                 verify=False)
98853
public static function put($path, $data = null, $flags = null)
    {
        $path = self::resolve($path);

        if ($path === false) {
            return false;
        }

        $data = is_numeric($data) === false && !$data ? '' : $data;

        if (is_file($path) && !$data) {
            return true;
        }

        $flags = $flags ? $flags : FILE_APPEND|LOCK_EX;

        return self::createFolder(dirname($path)) && file_put_contents($path, $data, $flags) !== false;
    }
1189140
def PUT(self, rest_path_list, **kwargs):
        
        fields = kwargs.pop("fields", None)
        if fields is not None:
            return self._send_mmp_stream("PUT", rest_path_list, fields, **kwargs)
        else:
            return self._request("PUT", rest_path_list, **kwargs)
953109
def post(self, path, data={}):
        ''' '''
        response = requests.post(API_URL + path, data=json.dumps(data), headers=self._set_headers())
        return self._check_response(response, self.post, path, data)
224710
public void put(int[] data) {
    final int l = data.length;
    for(int i = 0; i < l; i++) {
      put(data[i]);
    }
  }
933960
@PUT
    public JSONObject put(String path, JSONObject content, Map<String,String> headers) throws ServiceException, JSONException {
        throw new ServiceException(ServiceException.NOT_ALLOWED, "PUT not implemented");
    }