{@inheritDoc}

@see jcifs.internal.smb2.ServerMessageBlock2Request#createResponse(jcifs.CIFSContext,
jcifs.internal.smb2.ServerMessageBlock2Request)
500810
@Override
    protected Smb2QueryInfoResponse createResponse ( CIFSContext tc, ServerMessageBlock2Request<Smb2QueryInfoResponse> req ) {
        return new Smb2QueryInfoResponse(tc.getConfig(), this.infoType, this.fileInfoClass);
    }
757627
protected void buildSamlResponse(final HttpServletResponse response,
                                     final HttpServletRequest request,
                                     final Pair<AuthnRequest, MessageContext> authenticationContext,
                                     final Assertion casAssertion,
                                     final String binding) {

        val authnRequest = authenticationContext.getKey();
        val pair = getRegisteredServiceAndFacade(authnRequest);

        val entityId = pair.getValue().getEntityId();
        LOGGER.debug("Preparing SAML response for [{}]", entityId);
        samlProfileHandlerConfigurationContext.getResponseBuilder().build(authnRequest, request, response, casAssertion,
            pair.getKey(), pair.getValue(), binding, authenticationContext.getValue());
        LOGGER.info("Built the SAML response for [{}]", entityId);
    }
10791
function createResponse(request, response, body){
  return {
    statusCode: response.statusCode,
    statusText: response.statusMessage,
    headers: response.headers,
    originalUrl: request.url,
    effectiveUrl: request.url,
    redirected: false,
    requestMethod: request.method,
    requestHeaders: request.headers,
    body: body,
    retries: 0,
    throttled: false
  };
}
105947
private void setResponse(int statusCode, String statusMessage, String responseBody, Map<String, List<String>> responseHeaders)
    {
        mStatusCode      = statusCode;
        mStatusMessage   = statusMessage;
        mResponseBody    = responseBody;
        mResponseHeaders = responseHeaders;
    }
511878
public function create(
        EntityFactoryConfig $config,
        ServerRequestInterface $request,
        ResponseInterface $response,
        callable $next
    ): ResponseInterface {
        $entityRequest = $config->createEntityRequest($request, $this->container);

        # make a new empty record
        $obj = $entityRequest->instantiateActiveRecord();

        # Execute beforeCreate hook, which can alter record
        $entityRequest->beforeCreate($obj, $request);

        # Then, alter object with allowed properties
        if ($config->isHydrateEntityFromRequest()) {
            $requestParams = $request->getQueryParams();
            $postParams    = $request->getParsedBody();
            if ($postParams) {
                $requestParams = array_merge($requestParams, (array)$postParams);
            }

            /** @noinspection PhpUndefinedMethodInspection */
            $obj->fromArray($entityRequest->getAllowedDataFromRequest($requestParams, $request->getMethod()));
        }

        # Execute afterCreate hook, which can alter record
        $entityRequest->afterCreate($obj, $request);

        $request = $request->withAttribute($config->getParameterToInjectInto(), $obj);
        /** @var Response $response */
        return $next($request, $response);
    }
640047
static void sendResponse(final ManagementRequestContext<RegistrationContext> context, final byte responseType, final ModelNode response) throws IOException {
        final ManagementResponseHeader header = ManagementResponseHeader.create(context.getRequestHeader());
        final FlushableDataOutput output = context.writeMessage(header);
        try {
            sendResponse(output, responseType, response);
        } finally {
            StreamUtils.safeClose(output);
        }
    }
704773
public SipServletResponse createResponseToOriginalRequest(
            SipSession session, int status, String reasonPhrase) {

        if (session == null) {
            throw new NullPointerException("Null arg");
        }
        final MobicentsSipSession sipSession = (MobicentsSipSession) session;
        if (!sipSession.isValidInternal()) {
            throw new IllegalArgumentException("sip session " + sipSession.getId() + " is invalid !");
        }
        final MobicentsSipServletMessage sipServletMessageImpl = getOriginalRequest(sipSession);
        if (!(sipServletMessageImpl instanceof SipServletRequestImpl)) {
            throw new IllegalStateException("session creating transaction message is not a request !");
        }
        final SipServletRequestImpl sipServletRequestImpl = (SipServletRequestImpl) sipServletMessageImpl;
        if (RoutingState.FINAL_RESPONSE_SENT.equals(sipServletRequestImpl.getRoutingState())) {
            // checked by TCK test com.bea.sipservlet.tck.agents.api.javax_servlet_sip.B2buaHelperTest.testCreateResponseToOriginalRequest101
            throw new IllegalStateException("subsequent response is inconsistent with an already sent response. a Final response has already been sent for this request " + sipServletRequestImpl);
        }
        if (logger.isDebugEnabled()) {
            logger.debug("creating response to original request " + sipServletRequestImpl + " on session " + session);
        }

        //set dialog from session in case is forked/derived
        //do this before creating response so proper toTag is selected
        SIPTransaction tx = (SIPTransaction) sipServletRequestImpl.getTransaction();
        SIPDialog newDialog = (SIPDialog)sipSession.getSessionCreatingDialog();
        if (newDialog != null && tx != null) {
            logger.debug("recovering dialog on transaction before send:" + System.identityHashCode(newDialog));
            tx.setDialog(newDialog, newDialog.getDialogId());
        }

        SipServletResponseImpl response = (SipServletResponseImpl) sipServletRequestImpl.createResponse(status, reasonPhrase);





        return response;
    }
294351
@RequestMapping(path = "", method = RequestMethod.POST)
    public ResponseEntity<Customer> createCustomer(@RequestBody Customer customer){
        Customer newCustomer = customerService.createCustomer(customer);
        if(newCustomer != null){
            return new ResponseEntity<Customer>(newCustomer, HttpStatus.CREATED);
        }else{
            return new ResponseEntity<Customer>(HttpStatus.CONFLICT);
        }
    }
1006277
private void createResponse() {
        response = new GenericAnalyticsResponse(
            null,
            queryRowObservable.onBackpressureBuffer(),
            null,
            null,
            null,
            null,
            currentRequest,
            null,
            null,
            null
        );
    }
255454
protected HTTPResponse createHTTPResponse(int statusCode,String responseContent)
    {
        //create HTTP response
        HTTPResponse httpResponse=new HTTPResponse();
        httpResponse.setStatusCode(statusCode);
        httpResponse.setContent(responseContent);

        return httpResponse;
    }
878531
public static UnitResponse createSuccess(Object data, String errMsg) {
        return createSuccess(data).setMessage(errMsg);
    }
857091
protected Response createNotifyResponse(RequestEvent request, int status, String reason,
      List<Header> additionalHeaders) {
    // when used internally - WATCH OUT - retcode, errorMessage initialized here
    initErrorInfo();

    if ((request == null) || (request.getRequest() == null)) {
      setReturnCode(SipSession.INVALID_ARGUMENT);
      setErrorMessage("Null request given for creating NOTIFY response");
      return null;
    }

    Request req = request.getRequest();
    String cseqStr = "CSEQ " + ((CSeqHeader) req.getHeader(CSeqHeader.NAME)).getSeqNumber();
    LOG.trace("Creating NOTIFY {} response with status code {}, reason phrase = {}", cseqStr,
        status, reason);

    try {
      Response response = parent.getMessageFactory().createResponse(status, req);

      if (reason != null) {
        response.setReasonPhrase(reason);
      }

      ((ToHeader) response.getHeader(ToHeader.NAME)).setTag(myTag);

      response.addHeader((ContactHeader) parent.getContactInfo().getContactHeader().clone());

      if (additionalHeaders != null) {
        Iterator<Header> i = additionalHeaders.iterator();
        while (i.hasNext()) {
          response.addHeader(i.next());
        }
      }

      return response;
    } catch (Exception e) {
      setReturnCode(SipSession.EXCEPTION_ENCOUNTERED);
      setException(e);
      setErrorMessage("Exception: " + e.getClass().getName() + ": " + e.getMessage());
    }

    return null;
  }
503888
public CreateResponse create() throws IOException, PlivoRestException {
    validate();
    Response<CreateResponse> response = obtainCall().execute();

    handleResponse(response);

    return response.body();
  }
789911
@Override
    public SmbComBlankResponse initResponse ( CIFSContext tc ) {
        SmbComBlankResponse resp = new SmbComBlankResponse(tc.getConfig());
        setResponse(resp);
        return resp;
    }
1141076
private ISFSObject createResponseParams() {
        return ResponseParamsBuilder.create()
                .addition(addition)
                .excludedVars(excludedVars)
                .includedVars(includedVars)
                .transformer(new ParamTransformer(context))
                .data(data)
                .build();
    }
186472
protected function createResponse(BlockContextInterface $blockContext, Response $response = null)
    {
        if (null === $response) {
            $response = new Response();
        }

        // set the ttl from the block instance, this can be changed by the BlockService
        if (($ttl = $blockContext->getBlock()->getTtl()) > 0) {
            $response->setTtl($ttl);
        }

        return $response;
    }
775569
public TCResponseRequest createResponse(Dialog d) {
        if (d == null) {
            throw new NullPointerException("Dialog is null");
        }
        TCResponseRequestImpl tcer = new TCResponseRequestImpl();
        tcer.setDialog(d);
        tcer.setOriginatingAddress(d.getLocalAddress());
        return tcer;
    }