Class Symfony\Component\HttpFoundation\JsonResponse

extends Response

Response represents an HTTP response in JSON format.

Note that this class does not force the returned JSON content to be an object. It is however recommended that you do return an object as it protects yourself against XSSI and JSON-JavaScript Hijacking.

Methods
Methods inherited from Symfony\Component\HttpFoundation\Response
__toString(), __clone(), prepare(), sendHeaders(), sendContent(), send(), setContent(), getContent(), setProtocolVersion(), getProtocolVersion(), setStatusCode(), getStatusCode(), setCharset(), getCharset(), isCacheable(), isFresh(), isValidateable(), setPrivate(), setPublic(), setImmutable(), isImmutable(), mustRevalidate(), getDate(), setDate(), getAge(), expire(), getExpires(), setExpires(), getMaxAge(), setMaxAge(), setStaleIfError(), setStaleWhileRevalidate(), setSharedMaxAge(), getTtl(), setTtl(), setClientTtl(), getLastModified(), setLastModified(), getEtag(), setEtag(), setCache(), setNotModified(), hasVary(), getVary(), setVary(), isNotModified(), isInvalid(), isInformational(), isSuccessful(), isRedirection(), isClientError(), isServerError(), isOk(), isForbidden(), isNotFound(), isRedirect(), isEmpty(), closeOutputBuffers(), setContentSafe(), ensureIEOverSSLCompatibility()
Constants
Constants inherited from Symfony\Component\HttpFoundation\Response
HTTP_CONTINUE, HTTP_SWITCHING_PROTOCOLS, HTTP_PROCESSING, HTTP_EARLY_HINTS, HTTP_OK, HTTP_CREATED, HTTP_ACCEPTED, HTTP_NON_AUTHORITATIVE_INFORMATION, HTTP_NO_CONTENT, HTTP_RESET_CONTENT, HTTP_PARTIAL_CONTENT, HTTP_MULTI_STATUS, HTTP_ALREADY_REPORTED, HTTP_IM_USED, HTTP_MULTIPLE_CHOICES, HTTP_MOVED_PERMANENTLY, HTTP_FOUND, HTTP_SEE_OTHER, HTTP_NOT_MODIFIED, HTTP_USE_PROXY, HTTP_RESERVED, HTTP_TEMPORARY_REDIRECT, HTTP_PERMANENTLY_REDIRECT, HTTP_BAD_REQUEST, HTTP_UNAUTHORIZED, HTTP_PAYMENT_REQUIRED, HTTP_FORBIDDEN, HTTP_NOT_FOUND, HTTP_METHOD_NOT_ALLOWED, HTTP_NOT_ACCEPTABLE, HTTP_PROXY_AUTHENTICATION_REQUIRED, HTTP_REQUEST_TIMEOUT, HTTP_CONFLICT, HTTP_GONE, HTTP_LENGTH_REQUIRED, HTTP_PRECONDITION_FAILED, HTTP_REQUEST_ENTITY_TOO_LARGE, HTTP_REQUEST_URI_TOO_LONG, HTTP_UNSUPPORTED_MEDIA_TYPE, HTTP_REQUESTED_RANGE_NOT_SATISFIABLE, HTTP_EXPECTATION_FAILED, HTTP_I_AM_A_TEAPOT, HTTP_MISDIRECTED_REQUEST, HTTP_UNPROCESSABLE_ENTITY, HTTP_LOCKED, HTTP_FAILED_DEPENDENCY, HTTP_TOO_EARLY, HTTP_UPGRADE_REQUIRED, HTTP_PRECONDITION_REQUIRED, HTTP_TOO_MANY_REQUESTS, HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE, HTTP_UNAVAILABLE_FOR_LEGAL_REASONS, HTTP_INTERNAL_SERVER_ERROR, HTTP_NOT_IMPLEMENTED, HTTP_BAD_GATEWAY, HTTP_SERVICE_UNAVAILABLE, HTTP_GATEWAY_TIMEOUT, HTTP_VERSION_NOT_SUPPORTED, HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL, HTTP_INSUFFICIENT_STORAGE, HTTP_LOOP_DETECTED, HTTP_NOT_EXTENDED, HTTP_NETWORK_AUTHENTICATION_REQUIRED
Properties
Properties inherited from Symfony\Component\HttpFoundation\Response
$headers, $content, $version, $statusCode, $statusText, $charset, $statusTexts