Create the response object.
333849
private function createContainer(): void
    {
        if (!$this->container) {
            $builder = new ContainerBuilder();
            $builder->addDefinitions([
                self::class => $this,
            ]);
            $this->container = $builder->build();
        }
    }
712279
async def make_response(self, request, response):
        """"""
        while iscoroutine(response):
            response = await response

        if isinstance(response, StreamResponse):
            return response

        if isinstance(response, str):
            return Response(text=response, content_type='text/html')

        if isinstance(response, bytes):
            return Response(body=response, content_type='text/html')

        return Response(text=json.dumps(response), content_type='application/json')
1132631
def process_request(self, request_object):
        """"""

        resource = request_object.entity_cls.create(**request_object.data)
        return ResponseSuccessCreated(resource)
452110
public CreateResponse create(CreateRequest request) {
    return call(
      new PostRequest(path("create"))
        .setParam("name", request.getName())
        .setParam("organization", request.getOrganization()),
      CreateResponse.parser());
  }
472145
def _create_response(self, datapath, port, req):
        """"""
        src = datapath.ports[port].hw_addr
        res_ether = ethernet.ethernet(
            slow.SLOW_PROTOCOL_MULTICAST, src, ether.ETH_TYPE_SLOW)
        res_lacp = self._create_lacp(datapath, port, req)
        res_pkt = packet.Packet()
        res_pkt.add_protocol(res_ether)
        res_pkt.add_protocol(res_lacp)
        res_pkt.serialize()
        return res_pkt
438811
private void createResponse() {
        response = new GenericAnalyticsResponse(
                queryErrorObservable.onBackpressureBuffer(),
                queryRowObservable.onBackpressureBuffer(),
                querySignatureObservable.onBackpressureBuffer(),
                queryStatusObservable.onBackpressureBuffer(),
                queryInfoObservable.onBackpressureBuffer(),
                handle,
                currentRequest,
                status,
                requestID,
                clientContextID
        );
    }
75994
def create_response(self, status=201):
        
        self.response = self.get_response_handler()
        self.response.process(self.obj)

        return self._response(self.response.get_response_data(), status=status)
432414
def new_from_response(cls, response):
        
        return cls(response.url, html=response.text, headers=response.headers)
177675
def response_builder(self, response):
        '''
        '''
        try:
            r = response.json()
            result = r['query']['results']
            response = {
                'num_result': r['query']['count'] ,
                'result': result
            }
        except (Exception,) as e:
            print(e)
            return response.content

        return response
176366
def create(cls, data=None, api_key=None, endpoint=None, add_headers=None,
               **kwargs):
        """"""
        cls.validate(data)
        inst = cls(api_key=api_key)
        endpoint = ''
        return inst.request('POST',
                            endpoint=endpoint,
                            data=data,
                            query_params=kwargs,
                            add_headers=add_headers,
                            )
166853
def create(cls, custom_headers=None):
        

        if custom_headers is None:
            custom_headers = {}

        request_map = {

        }
        request_map_string = converter.class_to_json(request_map)
        request_map_string = cls._remove_field_for_request(request_map_string)

        api_client = client.ApiClient(cls._get_api_context())
        request_bytes = request_map_string.encode()
        endpoint_url = cls._ENDPOINT_URL_CREATE
        response_raw = api_client.post(endpoint_url, request_bytes,
                                       custom_headers)

        return BunqResponseSandboxUser.cast_from_bunq_response(
            cls._from_json(response_raw, cls._OBJECT_TYPE_POST)
        )
702070
function ResponseApi(constructorOptions) {

    LOG.debug('Instantiating new response object');
    LOG.debug('Validating options');

    try {

        this.options =
            new responseOptions.Constructor().validate(constructorOptions);

    } catch (err) {

        LOG.error('Received error: %s', err);

        throw(err);

    }

    this.response = {};
    this.isBatch = false;

    this._createResponseView();

}
537567
def create(self, service_name, json, **kwargs):
        """"""
        return self._send(requests.post, service_name, json, **kwargs)
1046762
protected function createResponse()
	{
		try {
			$body = $this->stream->createStream(fopen('php://temp', 'w+b'));
		}
		catch (InvalidArgumentException $e) {
			throw new RuntimeException('Unable to create stream "php://temp"');
		}

		return new ResponseBuilder(
			$this->message->createResponse(200, null, [], $body)
		);
	}
681540
public CreateResponse create(CreateRequest request) throws IOException {
        return new CreateResponse(client.doPost(request.toUrl(), request.getBody()));
    }
83580
async def create(self, **kwargs):
        '''
        
        '''
        try:
            # create model
            obj = self._meta.object_class()
            # deserialize data from request body
            self.data.update(kwargs)
            await obj.deserialize(self.data)
            # create document in DB
            await obj.insert(db=self.db)
            # serialize object for response
            return await obj.serialize()
        except Exception as ex:
            logger.exception(ex)
            raise BadRequest(ex)
632524
def make_response(self, content, code=200, headers=None):
        """"""
        if headers:
            for header in headers:
                self.headers[header] = headers[header]
        return make_response(content, code, self.headers)