We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6bf68e commit 01e1d4aCopy full SHA for 01e1d4a
http_client.rst
@@ -2032,6 +2032,19 @@ Then configure Symfony to use your callback:
2032
;
2033
};
2034
2035
+You can also use :class:`Symfony\\Component\\HttpClient\\Response\\JsonMockResponse` which automatically encode
2036
+and set `application/json` header::
2037
+
2038
+ use Symfony\Component\HttpClient\Response\JsonMockResponse;
2039
2040
+ $response = new JsonMockResponse([
2041
+ 'foo' => 'bar',
2042
+ ]);
2043
2044
+.. versionadded:: 6.3
2045
2046
+ The ``JsonMockResponse`` was introduced in Symfony 6.3.
2047
2048
Testing Request Data
2049
~~~~~~~~~~~~~~~~~~~~
2050
0 commit comments