Works together with 'mark_as_executed' and 'free' methods.

        It marks request as forwarded to 'to' replicas.
        To let request be removed, it should be marked as executed and each of
        'to' replicas should call 'free'.
762314
def mark_as_forwarded(self, req: Request, to: int):
        
        self[req.key].forwarded = True
        self[req.key].forwardedTo = to
        self[req.key].unordered_by_replicas_num = to
745242
def delete(self, uri_relative, custom_headers):
        

        return self._request(
            self._METHOD_DELETE,
            uri_relative,
            self._BYTES_EMPTY,
            {},
            custom_headers
        )
1244720
def delete(self, url):
        
        logger.debug('Making DELETE request to %s', url)
        return self.oauth_session.delete(url)
687788
def process_request(self, request, client_address):
        

        self.finish_request(request, client_address)
        self.shutdown_request(request)
1026218
def do_delete(endpoint, access_token):
    '''
    '''
    headers = {"Authorization": 'Bearer ' + access_token}
    headers['User-Agent'] = get_user_agent()
    return requests.delete(endpoint, headers=headers)
726967
<T> void finish(Request<T> request) {
        // Remove from the set of requests currently being processed.
        synchronized (mCurrentRequests) {
            mCurrentRequests.remove(request);
        }
        synchronized (mFinishedListeners) {
          for (RequestFinishedListener<T> listener : mFinishedListeners) {
            listener.onRequestFinished(request);
          }
        }

        if (request.shouldCache()) {
            synchronized (mWaitingRequests) {
                String cacheKey = request.getCacheKey();
                Queue<Request<?>> waitingRequests = mWaitingRequests.remove(cacheKey);
                if (waitingRequests != null) {
                    if (VolleyLog.DEBUG) {
                        VolleyLog.v("Releasing %d waiting requests for cacheKey=%s.",
                                waitingRequests.size(), cacheKey);
                    }
                    // Process all queued up requests. They won't be considered as in flight, but
                    // that's not a problem as the cache has been primed by 'request'.
                    mCacheQueue.addAll(waitingRequests);
                }
            }
        }
    }
37324
def delete(self, path, callback=None, timeout=None, **kwargs):  # pragma: no cover
        
        request = self.mk_request(defines.Codes.DELETE, path)

        for k, v in kwargs.items():
            if hasattr(request, k):
                setattr(request, k, v)

        return self.send_request(request, callback, timeout)
805343
def request(self, _cache_key, _cache_ignore, _cache_timeout, **kwargs):
        
        if _cache_key:
            # Pop the request's session cookies from the cache key.
            # These appear to be unreliable and change with every
            # request. Also, with the introduction of OAuth I don't think
            # that cookies are being used to store anything that
            # differentiates API requests anyways
            url, items = _cache_key
            _cache_key = (url, (items[0], items[1], items[3], items[4]))

        if kwargs['request'].method != 'GET':
            # I added this check for RTV, I have no idea why PRAW would ever
            # want to cache POST/PUT/DELETE requests
            _cache_ignore = True

        if _cache_ignore:
            return self._request(**kwargs)

        self._clear_timeouts(_cache_timeout)
        if _cache_key in self.cache:
            return self.cache[_cache_key]

        result = self._request(**kwargs)

        # The handlers don't call `raise_for_status` so we need to ignore
        # status codes that will result in an exception that should not be
        # cached.
        if result.status_code not in (200, 302):
            return result

        self.timeouts[_cache_key] = timer()
        self.cache[_cache_key] = result
        return result
629677
async def _flush(self, request: 'Request', stacks: List[Stack]):
        

        for stack in stacks:
            await self.platform.send(request, stack)
1033815
def __Delete(self, path, request, headers):
        
        return synchronized_request.SynchronizedRequest(self,
                                                        request,
                                                        self._global_endpoint_manager,
                                                        self.connection_policy,
                                                        self._requests_session,
                                                        'DELETE',
                                                        path,
                                                        request_data=None,
                                                        query_params=None,
                                                        headers=headers)
209798
def set_request_line(self, method, url, version):
        
        self.parsed_request = (method, url, version)
        self.request = {
            'method': method,
            'url': url,
            'version': version
        }
397601
def delete_synonym!(objectID, forward_to_replicas = false, request_options = {})
      res = delete_synonym(objectID, forward_to_replicas, request_options)
      wait_task(res['taskID'], WAIT_TASK_DEFAULT_TIME_BEFORE_RETRY, request_options)
      res
    end
1310176
def is_request_sent(request, relation='ceph'):
    
    states = get_request_states(request, relation=relation)
    for rid in states.keys():
        if not states[rid]['sent']:
            return False

    return True
1318221
def _delete(self, *args, **kwargs):
        

        if 'timeout' not in kwargs:
            kwargs['timeout'] = self.timeout

        req = self.session.delete(*args, **kwargs)
        return req
983652
def put(self, request, *args, **kwargs):
        
        with reversion.create_revision():
            reversion.set_user(request.user)
            reversion.set_comment('changed through the RESTful API from ip %s' % request.META['REMOTE_ADDR'])
            return self.update(request, *args, **kwargs)
88824
def clear_request(name=None):
    '''
    
    '''
    notify_path = os.path.join(__opts__['cachedir'], 'req_state.p')
    serial = salt.payload.Serial(__opts__)
    if not os.path.isfile(notify_path):
        return True
    if not name:
        try:
            os.remove(notify_path)
        except (IOError, OSError):
            pass
    else:
        req = check_request()
        if name in req:
            req.pop(name)
        else:
            return False
        with salt.utils.files.set_umask(0o077):
            try:
                if salt.utils.platform.is_windows():
                    # Make sure cache file isn't read-only
                    __salt__['cmd.run']('attrib -R "{0}"'.format(notify_path))
                with salt.utils.files.fopen(notify_path, 'w+b') as fp_:
                    serial.dump(req, fp_)
            except (IOError, OSError):
                log.error(
                    'Unable to write state request file %s. Check permission.',
                    notify_path
                )
    return True
334343
def delete(self):
        
        resp = self._client.delete(type(self).api_endpoint, model=self)

        if 'error' in resp:
            return False
        self.invalidate()
        return True