Returns the leading parameters for a `get` or `remove` request (the id)
169035
function reqId (req) {
  return [ req.params.service, fp.parseNil(req.params.id) ];
}
798643
function subId (req) {
  return [ req.params.service + '/' + req.params.subresources, fp.parseNil(req.params.id) ];
}
992100
def get_from_params(request, key):
    
    data = getattr(request, 'json', None) or request.values
    value = data.get(key)
    return to_native(value)
594628
def delete(self, obj, id):
        
        self.url = '{}{}/{}'.format(self.base_url, obj, id)
        self.method = 'DELETE'
        self.resp = requests.delete(url=self.url,
                                    auth=self.auth,
                                    headers=self.headers, cert=self.ca_cert)
        return self.__process_resp__(obj)
723206
def append_request_id(req, resp, resource, params):
    
    def get_headers(resp):
        if hasattr(resp, 'headers'):
            return resp.headers
        if hasattr(resp, '_headers'):
            return resp._headers
        return None

    if(isinstance(resp, Response) or
       (get_headers(resp) is not None)):
        # Extract 'x-request-id' from headers if
        # response is a Response object.
        request_id = get_headers(resp).get('x-request-id')
    else:
        # If resp is of type string or None.
        request_id = resp

    if resource.req_ids is None:
        resource.req_ids = []

    if request_id not in resource.req_ids:
        resource.req_ids.append(request_id)
1117505
def get(self, id):
        
        id = self.key_name(id)
        session_json = self.redis.get(id) or '{}'
        return json_loads(session_json)
643732
def get_requests(self):
        

        requests = self.derived_get_requests()

        for request in requests:
            request.url = URLHelper.remove_hash(request.url)

        return requests
772399
function request(req) {
        var clientID = getParam(req, 'client_id')
            , redirectURI = getParam(req, 'redirect_uri')
            , scope = getParam(req, 'scope')
            , state = getParam(req, 'state');

        if (!clientID) {
            throw new AuthorizationError('Missing required parameter: client_id', 'invalid_request');
        }

        if (scope) {
            for (var i = 0, len = separators.length; i < len; i++) {
                var separated = scope.split(separators[i]);
                // only separate on the first matching separator.  this allows for a sort
                // of separator "priority" (ie, favor spaces then fallback to commas)
                if (separated.length > 1) {
                    scope = separated;
                    break;
                }
            }

            if (!Array.isArray(scope)) {
                scope = [scope];
            }
        }

        return {
            clientID: clientID,
            redirectURI: redirectURI,
            scope: scope,
            state: state
        };
    }
1141159
def delete(self, id):
        
        id = self.as_id(id)
        response = self.http.delete(
            '%s/%s' % (self.api_url, id),
            auth=self.auth)
        response.raise_for_status()
1225115
def delete(self, request, id, format=None):
        
        bot = self.get_bot(id, request.user)
        bot.delete()
        return Response(status=status.HTTP_204_NO_CONTENT)
149226
def get(self, url, data=None, params=None):
        
        return self.request("get", url, data, params)
1124703
def get(self, request, *args, **kwargs):
        
        self.object = self.get_object()
        can_delete = True
        protected_objects = []
        collector_message = None
        collector = Collector(using="default")
        try:
            collector.collect([self.object])
        except ProtectedError as e:
            collector_message = (
                "Cannot delete %s because it has relations "
                "that depends on it." % self.object
            )
            protected_objects = e.protected_objects
            can_delete = False

        if can_delete and self.redirect:
            messages.success(request, self.get_success_message(self.object))
            return self.delete(request, *args, **kwargs)

        context = self.get_context_data(
            object=self.object,
            can_delete=can_delete,
            collector_message=collector_message,
            protected_objects=protected_objects,
        )
        return self.render_to_response(context)
1061932
def delete(self, request, id=None):
        
        if id:
            obj = get_object_or_404(self.queryset(request), id=id)
            if not self.has_delete_permission(request, obj):
                return HttpResponseForbidden(_('You do not have permission to perform this action.'))
            else:
                return self.delete_object(request, obj)
        else:
            # No delete requests allowed on collection view
            return HttpResponseForbidden()
952082
def get(self, request, bot_id, format=None):
        
        return super(HandlerList, self).get(request, bot_id, format)
595223
def get(cls, id):
        '''
        
        '''
        client = cls._new_api_client()
        return client.make_request(cls, 'get', url_params={'id': id})
72239
def index(request, obj_id=None):
    """"""
    if request.method == 'GET':
        return get(request, obj_id)
    elif request.method == 'POST':
        return post(request)
    elif request.method == 'PUT':
        getPutData(request)
        return put(request, obj_id)
    elif request.method == 'DELETE':
        getPutData(request)
        return delete(request, obj_id)
26899
def handleFlaskGetRequest(id_, flaskRequest, endpoint):
    
    if flaskRequest.method == "GET":
        return handleHttpGet(id_, endpoint)
    else:
        raise exceptions.MethodNotAllowedException()