Perform a PATCH request to a path
331533
def patch(path, options = {}, &block)
      perform_request Net::HTTP::Patch, path, options, &block
    end
1240359
public static function patch($path, $callback)
    {
        self::instance()->addRoute('PATCH', $path, self::callback($callback));
    }
966836
def patch(path, data, options = {})
      uri = build_uri(path, options)

      request = Net::HTTP::Patch.new(uri.request_uri)
      set_authorisation_header(request)
      request.set_form_data(data)

      response = https_client(uri).request(request)
    end
671135
def request method, path, opts={}
      conn_options = connection_options opts
      opts['api_key'] = api_key unless opts.has_key? 'api_key'
      opts['file_type'] = file_type unless opts.has_key? 'file_type'

      response = connection(conn_options).send(method) do |request|
        case method
        when :get
          request.url path, opts
        when :delete
          request.url path, opts
        when :patch, :post, :put
          if conn_options[:force_urlencoded]
            request.url path, opts
          else
            request.path = path
            request.body = MultiJson.dump(opts) unless opts.empty?
          end
        end
      end

      response
    end
537729
def patch(self, url, data=None, **kwargs):
        """"""
        return requests.patch(url, data=data, headers=self.add_headers(**kwargs))
154521
def fixpath(path):
    """"""
    return os.path.normpath(os.path.realpath(os.path.expanduser(path)))
1083716
public MockResponse handlePatch(String path, String s) {
        MockResponse response = new MockResponse();
        String body = doGet(path);
        if (body == null) {
            response.setResponseCode(404);
        } else {
            try {
                JsonNode patch = context.getMapper().readTree(s);
                JsonNode source = context.getMapper().readTree(body);
                JsonNode updated = JsonPatch.apply(patch, source);
                String updatedAsString = context.getMapper().writeValueAsString(updated);
                AttributeSet features = AttributeSet.merge(attributeExtractor.fromPath(path),
                        attributeExtractor.fromResource(updatedAsString));
                map.put(features, updatedAsString);
                response.setResponseCode(202);
                response.setBody(updatedAsString);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }

        }
        return response;
    }
1146773
function updatePersistentPath(client, path, data, callback) {
  debug('updatePersistentPath: "%s" "%s"', path, data);

  data = ensureBuffer(data);

  client.setData(path, data, function (err) {
    if (err) {
      if (err.code !== NO_NODE)
        return callback(err);

      createParentPath(client, path, function(err) {
        if (err) return callback(err);

        client.create(path, data, function(err) {
          if (err) {
            if (err.code !== NODE_EXISTS)
              return callback(err);
            client.setData(path, data, callback);
          } else
            callback(null);
        });
      });
    } else
      callback(null);
  });
}
356124
public void PATCH(String partialUrl, Object payload)
    {    
        URI uri = buildUri(partialUrl);   
        executePatchRequest(uri, payload);
    }
431244
def _fix_path(self, path):
        
        if path.endswith('/'):
            path = path.rstrip('/')

        return safe_str(path)
310774
def patch(callback=None, path=None, method=Method.PATCH, resource=None, tags=None, summary="Patch specified resource.",
          middleware=None):
    # type: (Callable, Path, Methods, Resource, Tags, str, List[Any]) -> Operation
    
    def inner(c):
        op = ResourceOperation(c, path or PathParam('{key_field}'), method, resource, tags, summary, middleware,
                               full_clean=False, default_to_not_supplied=True)
        op.responses.add(Response(HTTPStatus.OK, "{name} has been patched."))
        op.responses.add(Response(HTTPStatus.BAD_REQUEST, "Validation failed.", Error))
        op.responses.add(Response(HTTPStatus.NOT_FOUND, "Not found", Error))
        return op
    return inner(callback) if callback else inner
1341210
def put(path, options={}, raw=false, unformatted=true)
      request(:put, path, options, raw, unformatted)
    end
548543
def put(path, token, query: {}, payload: {})
      request(:put, path, token, query, payload)
    end
1050328
public static function patch($path, $options = array()) {
    $requestOptions = array(
      "path" => $path,
      "method" => "PATCH",
      "body" => $options["body"]
    );

    if (!empty($options["sign"])) {
      $requestOptions["sign"] = $options["sign"];
    }

    return self::request($requestOptions);
  }
373353
def request(method, path, options, raw=false)
      before_request
      response = connection(raw).send(method) do |request|
        case method
        when :get, :delete
          request.url(formatted_path(path), options)
        when :patch, :post, :put
          request.path = formatted_path(path)
          request.headers['Content-Type'] = 'application/json'
          request.body = options.to_json unless options.empty?
        end
      end
      raw ? response : response.body
    end
731799
def _update(self, **kwargs):
        """"""
        path = self._construct_path_to_item()
        if not kwargs:
            return
        return self._http.put(path, json.dumps(kwargs))
1309336
def apply_patch(self, patch_path):
        
        # Do not create .orig backup files, and merge files in place.
        return self._execute('patch -p1 --no-backup-if-mismatch --merge', stdout=open(os.devnull, 'w'), stdin=open(patch_path, 'r'))[0]