Return a generic success response.
332231
def success_response(**data):
    """"""
    data_out = {}
    data_out["status"] = "success"
    data_out.update(data)
    js = dumps(data_out, default=date_handler)
    return Response(js, status=200, mimetype="application/json")
11530
function (fn) {
            return function (response) {
                fn(response.status === "success" ? true : false, response.message, response.data);
            };
        }
524540
public static <T> GenericResponseBuilder<T> ok(T entity) {
    return genericResponseBuilderFactory.create(Response.Status.OK.getStatusCode(), entity);
  }
1255379
def success(self):
        """"""
        self._check_valid()
        return self._problem._p.get_status() == qsoptex.SolutionStatus.OPTIMAL
218489
function () {
    if (req.readyState !== 4) return;
    if (req.status === 200) successCb(null, JSON.parse(req.responseText));
    else {
      var err = { error: 'Sorry, an error ocurred on the server' };

      if (errorCb && typeof errorCb === 'function') return errorCb(err);
      successCb(err, null);
    }
  }
363429
public static <T> GenericResponseBuilder<T> status(Response.Status status) {
    return status((Response.StatusType) status);
  }
653202
function desiredResponse (context) {
  const callback = context.task.callbackManager.callbacks[context.executionName]
  return callback ? callback.eventName : COMPLETE
}
37724
function(originalResponse, successful) {
            var response = originalResponse;

            // The passed "response" param may not be a response at all.
            // It could be a string, detailing the error, for example.
            if (!qq.isObject(originalResponse)) {
                response = {};

                if (qq.isString(originalResponse) && !successful) {
                    response.error = originalResponse;
                }
            }

            response.success = successful;

            return response;
        }
561019
def process_response(self, request, response, resource, req_succeeded):
        """"""
        self.logger.info(self._generate_combined_log(request, response))
802361
def success(self):
        """"""
        self._check_valid()
        return self._problem._p.Status == gurobipy.GRB.OPTIMAL
444429
def make_response(message, status_code, details=None):
    """"""
    response_body = dict(message=message)
    if details:
        response_body['details'] = details
    response = jsonify(response_body)
    response.status_code = status_code
    return response
1262407
def got_response(self):
        
        return any(message.sender != self.initiator
                   for message in self.messages)
295091
def handleResponse(self, data):
        """"""

        self.factory.response_xml = data

        if self.status == '200':
            self.factory.parseErrorAndResponse(data)

        self.factory.deferred = None
        self.transport.loseConnection()
930103
def getresponse(self):
        
        resp = self.http.getresponse()
        self.log.info("resp is %s", str(resp))
        if resp.status < 400:
            return resp
        else:
            errtext = resp.read()
            content_type = resp.getheader('Content-Type', 'text/plain')
            raise HttpError(code=resp.status, content_type=content_type, content=errtext)
1196116
def error_response(self, error, mimetype='application/json', status=400,
            **kwargs):
        
        return HttpResponse(json.dumps(error), mimetype=mimetype,
                status=status, **kwargs)
760696
def error_response(message, status=400, code=None):
    """""""
    from django.http import JsonResponse
    data = {'message': message}
    if code:
        data['code'] = code
    LOG.error("Error response, status code is : {} | {}".format(status, data))
    return JsonResponse(data=data, status=status)
390073
def success(self, **kwargs):
        """"""
        response = {'success': True}
        # check dates can be manipulated
        response.update(kwargs)
        response.update(self.kwargs)
        response['test_argument3'] = datetime.timedelta(days=1) + response['test_argument3']
        return response