Renders the final response output
190066
def render_openid_response(resp)
      signed_response = openid_server.signatory.sign(resp) if resp.needs_signing
      web_response = openid_server.encode_response(resp)
      case web_response.code
      when OpenID::Server::HTTP_OK then render(:text => web_response.body, :status => 200)
      when OpenID::Server::HTTP_REDIRECT then redirect_to(web_response.headers['location'])
      else render(:text => web_response.body, :status => 400)
      end
    end
1278065
def render_to_response(self, context, **response_kwargs):
        '''
        
        '''
        switcher = {
            'json': self.return_json_response,
            'opml': self.return_opml_response,
            'md': self.return_md_response,
            'textbundle': self.not_implemented,
            'xlsx': self.not_implemented,
        }
        if self.format not in switcher.keys():
            return self.not_implemented(context, **response_kwargs)
        return switcher[self.format](context, **response_kwargs)
1161367
def render_to_response(self, context=False):
        """"""
        f = self.openfile()
        wrapper = FileWrapper(f)
        response = HttpResponse(wrapper, content_type=self.content_type())
        self.headers(response)
        return response
397517
def render_to_response(self, context, **response_kwargs):
        
        return HttpResponse(json.dumps(context, cls=JSON_ENCODER), 
                            content_type='application/json',
                            **response_kwargs)
1006676
@Override
	public void render() {
		if (false == HuluSetting.isDevMode) {
			Response.sendError(this.errorCode, this.errorContent);
			return;
		}

		if (null != e) {
			StaticLog.error(e);
			if (null == this.errorContent) {
				this.errorContent = StrUtil.EMPTY;
			}
			String stacktraceContent = ExceptionUtil.stacktraceToString(e)
					.replace("\tat", "&nbsp;&nbsp;&nbsp;&nbsp;\tat")
					.replace("\n", "<br/>\n");
			this.errorContent = StrUtil.format(TEMPLATE_ERROR, this.getErrorCode(), Request.getServletRequest().getRequestURI(), this.errorContent, stacktraceContent);
		}
		
		Response.setStatus(errorCode);
		Response.write(errorContent, Response.CONTENT_TYPE_HTML);
	}
1155591
def output_callback(self, out, process_status):
        
        self.final_status.append(process_status)
        self.final_output.append(out)
624655
def render_to_response(self, context):
        ""
        return http.HttpResponse(
            self.render_template(context),
            content_type=self.mimetype)
598287
protected function render()
    {
        Yii::info(''
            . PHP_EOL . 'View: ' . $this->view
            . PHP_EOL . 'Params: ' . VarDumper::dumpAsString($this->params, 2), __METHOD__);

        $this->response = $this->controller->render($this->view, $this->params);
    }
202244
def render(self, data, accepted_media_type=None, renderer_context=None):
        

        wrapper = None
        success = False

        for wrapper_name in self.wrappers:
            wrapper_method = getattr(self, wrapper_name)
            try:
                wrapper = wrapper_method(data, renderer_context)
            except WrapperNotApplicable:
                pass
            else:
                success = True
                break

        if not success:
            raise WrapperNotApplicable(
                'No acceptable wrappers found for response.',
                data=data, renderer_context=renderer_context)

        renderer_context["indent"] = 4

        return super(JsonApiMixin, self).render(
            data=wrapper,
            accepted_media_type=accepted_media_type,
            renderer_context=renderer_context)
1144508
public function render()
    {
        // Massage the response from base controller subclassings of sidebar
        $items = array_map(function ($item) {

            // If a listing instance, apply defaults common to all sidebar instances
            if (is_a($item, 'Bkwld\Decoy\Fields\Listing')) {
                return $item->layout('sidebar')->parent($this->parent)->__toString();
            }

            // Anything else will be converted to a string in the next step
            return $item;
        }, array_merge($this->items, $this->ending_items));

        // Combine all listing items into a single string and return
        return array_reduce($items, function ($carry, $item) {
            return $carry.$item;
        }, '');
    }
839210
def RenderHttpResponse(request):
  """"""

  start_time = time.time()
  response = HTTP_REQUEST_HANDLER.HandleRequest(request)
  total_time = time.time() - start_time

  method_name = response.headers.get("X-API-Method", "unknown")
  if response.status_code == 200:
    status = "SUCCESS"
  elif response.status_code == 403:
    status = "FORBIDDEN"
  elif response.status_code == 404:
    status = "NOT_FOUND"
  elif response.status_code == 501:
    status = "NOT_IMPLEMENTED"
  else:
    status = "SERVER_ERROR"

  if request.method == "HEAD":
    metric_name = "api_access_probe_latency"
  else:
    metric_name = "api_method_latency"

  stats_collector_instance.Get().RecordEvent(
      metric_name, total_time, fields=(method_name, "http", status))

  return response
719863
@Override
	public void render() {
		final String callback = Request.getParam(callbackParamName, Response.DEFAULT_CALLBACK_NAME);
		this.text = StrUtil.format("{}({})", callback, this.text);
		super.render();
	}
369690
public void render() {
    try {
      this.response.setHeader("Content-type", "text/html; charset=UTF-8");
      this.response.setCharacterEncoding("UTF-8");
      this.response.setContentType(this.mimeType);
      this.engine.mergeTemplate(this.template, "UTF-8", this.context, this.response.getWriter());
    } catch (final Exception e) {
      throw new PageRenderException(e);
    }
  }
1057551
function (response) {
            response = JSON.parse(response).result;
            response.stdout.forEach(function (val, index, array) {
                if (val == answers[index]) {
                    results.push(true);
                } else {
                    results.push(false);
                }
            });
            callback({
                results: results,
                message: response.message,
                time: response.time
            });
        }
339157
def _render_final(self, render_func, *context, **kwargs):
        
        stack = ContextStack.create(*context, **kwargs)
        self._context = stack

        engine = self._make_render_engine()

        return render_func(engine, stack)
1050395
def render_file(self, context, result):
		""""""
		if __debug__:
			log.debug("Processing file-like object.", extra=dict(request=id(context), result=repr(result)))
		
		response = context.response
		response.conditional_response = True
		
		modified = mktime(gmtime(getmtime(result.name)))
		
		response.last_modified = datetime.fromtimestamp(modified)
		ct, ce = guess_type(result.name)
		if not ct: ct = 'application/octet-stream'
		response.content_type, response.content_encoding = ct, ce
		response.etag = unicode(modified)
		
		result.seek(0, 2)  # Seek to the end of the file.
		response.content_length = result.tell()
		
		result.seek(0)  # Seek back to the start of the file.
		response.body_file = result
		
		return True
1241552
public void render(@NonNull Resource output) throws IOException {
      render(output, GraphViz.Format.PNG);
   }