{@inheritDoc}

@see jcifs.internal.smb2.ServerMessageBlock2Request#createResponse(jcifs.CIFSContext,
jcifs.internal.smb2.ServerMessageBlock2Request)
481638
@Override
    protected Smb2ChangeNotifyResponse createResponse ( CIFSContext tc, ServerMessageBlock2Request<Smb2ChangeNotifyResponse> req ) {
        return new Smb2ChangeNotifyResponse(tc.getConfig());
    }
615848
public static function create(
        $content,
        $content_type = null,
        $status = ServiceResponseInterface::HTTP_OK,
        $headers = []
    ) {
        return new ServiceResponse($content, $content_type, $status, $headers);
    }
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);
        }
    }
928677
@POST
    @Timed
    public void createResource(@Suspended final AsyncResponse response, @Context final Request request,
            @Context final UriInfo uriInfo, @Context final HttpHeaders headers,
            @Context final SecurityContext secContext, final InputStream body) {
        final TrellisRequest req = new TrellisRequest(request, uriInfo, headers, secContext);
        final String urlBase = getBaseUrl(req);
        final String path = req.getPath();
        final String identifier = getIdentifier(req);
        final String separator = path.isEmpty() ? "" : "/";

        final IRI parent = rdf.createIRI(TRELLIS_DATA_PREFIX + path);
        final IRI child = rdf.createIRI(TRELLIS_DATA_PREFIX + path + separator + identifier);
        final PostHandler postHandler = new PostHandler(req, parent, identifier, body, trellis, urlBase);

        trellis.getResourceService().get(parent)
            .thenCombine(trellis.getResourceService().get(child), postHandler::initialize)
            .thenCompose(postHandler::createResource).thenCompose(postHandler::updateMemento)
            .thenApply(ResponseBuilder::build).exceptionally(this::handleException).thenApply(response::resume);
    }
1242878
private static Response createResponse(Object object, AlluxioConfiguration alluxioConf,
      @Nullable Map<String, Object> headers) {
    if (object instanceof Void) {
      return Response.ok().build();
    }
    if (object instanceof String) {
      // Need to explicitly encode the string as JSON because Jackson will not do it automatically.
      ObjectMapper mapper = new ObjectMapper();
      try {
        return Response.ok(mapper.writeValueAsString(object)).build();
      } catch (JsonProcessingException e) {
        return createErrorResponse(e, alluxioConf);
      }
    }

    Response.ResponseBuilder rb = Response.ok(object);
    if (headers != null) {
      headers.forEach(rb::header);
    }

    if (alluxioConf.getBoolean(PropertyKey.WEBUI_CORS_ENABLED)) {
      return makeCORS(rb).build();
    }

    return rb.build();
  }
434609
private static Response createResponse(Object object) {
    if (object == null) {
      return Response.ok().build();
    }

    if (object instanceof Response) {
      return (Response) object;
    }

    if (object instanceof Response.Status) {
      Response.Status s = (Response.Status) object;
      switch (s) {
        case OK:
          return Response.ok().build();
        case ACCEPTED:
          return Response.accepted().build();
        case NO_CONTENT:
          return Response.noContent().build();
        default:
          return createErrorResponse(
              new S3Exception("Response status is invalid", S3ErrorCode.INTERNAL_ERROR));
      }
    }

    // Need to explicitly encode the string as XML because Jackson will not do it automatically.
    XmlMapper mapper = new XmlMapper();
    try {
      return Response.ok(mapper.writeValueAsString(object)).build();
    } catch (JsonProcessingException e) {
      return Response.status(Response.Status.INTERNAL_SERVER_ERROR)
          .entity("Failed to encode XML: " + e.getMessage()).build();
    }
  }
940519
@Override
	public FbBotMillResponse createResponse(MessageEnvelope envelope) {
		return ReplyFactory.addTypingAction(this.typingAction).build(envelope);
	}
101989
public Response newResponse(final String id, final ZonedDateTime issueInstant,
                                final String recipient, final WebApplicationService service) {

        val samlResponse = newSamlObject(Response.class);
        samlResponse.setID(id);
        samlResponse.setIssueInstant(DateTimeUtils.dateTimeOf(issueInstant));
        samlResponse.setVersion(SAMLVersion.VERSION_20);
        if (StringUtils.isNotBlank(recipient)) {
            LOGGER.debug("Setting provided RequestId [{}] as InResponseTo", recipient);
            samlResponse.setInResponseTo(recipient);
        } else {
            LOGGER.debug("No recipient is provided. Skipping InResponseTo");
        }
        return samlResponse;
    }
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;
  }
878531
public static UnitResponse createSuccess(Object data, String errMsg) {
        return createSuccess(data).setMessage(errMsg);
    }
253191
public synchronized void create( HttpServletRequest request, HttpServletResponse response, ServletContext servletContext )
        throws Exception
    {
        reinitialize( request, response, servletContext );
        JavaControlUtils.initJavaControls( request, response, servletContext, this );
        onCreate();
    }
91350
private static void sendResponse(ChannelHandlerContext ctx, ByteBuf payload) {
        // Send a frame for the response status
        Http2Headers headers = new DefaultHttp2Headers().status(OK.codeAsText());
        ctx.write(new DefaultHttp2HeadersFrame(headers));
        ctx.write(new DefaultHttp2DataFrame(payload, true));
    }
69740
public static HttpResponse newResponse(RequestContext ctx, HttpStatus status,
                                           String format, Object... args) {
        requireNonNull(ctx, "ctx");
        requireNonNull(status, "status");
        requireNonNull(format, "format");
        requireNonNull(args, "args");
        return newResponse(ctx, status, String.format(Locale.ENGLISH, format, args));
    }
789911
@Override
    public SmbComBlankResponse initResponse ( CIFSContext tc ) {
        SmbComBlankResponse resp = new SmbComBlankResponse(tc.getConfig());
        setResponse(resp);
        return resp;
    }
503888
public CreateResponse create() throws IOException, PlivoRestException {
    validate();
    Response<CreateResponse> response = obtainCall().execute();

    handleResponse(response);

    return response.body();
  }
970048
private void sendResponse(Collection<Operation> operations, ServiceNamespace ns) {
        NodeEngine nodeEngine = getNodeEngine();

        PartitionReplicaSyncResponse syncResponse = createResponse(operations, ns);
        Address target = getCallerAddress();
        ILogger logger = getLogger();
        if (logger.isFinestEnabled()) {
            logger.finest("Sending sync response to -> " + target + " for partitionId="
                    + getPartitionId() + ", replicaIndex=" + getReplicaIndex() + ", namespaces=" + ns);
        }

        // PartitionReplicaSyncResponse is TargetAware and sent directly without invocation system.
        syncResponse.setTarget(target);

        OperationService operationService = nodeEngine.getOperationService();
        operationService.send(syncResponse, target);
    }
589322
@Override
    public IResponse createResponse(IRequest ireq, HttpInboundConnection inboundConnection) {
        return new IResponse40Impl(ireq, inboundConnection);
    }