Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 291 - 300 of 1,838 for RESPONSE (0.05 seconds)

  1. tests/test_tutorial/test_header_params/test_tutorial001.py

    def test(path, headers, expected_status, expected_response, client: TestClient):
        response = client.get(path, headers=headers)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
            "openapi": "3.1.0",
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 3.9K bytes
    - Click Count (0)
  2. tests/test_tutorial/test_header_params/test_tutorial002.py

    def test(path, headers, expected_status, expected_response, client: TestClient):
        response = client.get(path, headers=headers)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
            "openapi": "3.1.0",
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 4.1K bytes
    - Click Count (0)
  3. tests/test_tutorial/test_security/test_tutorial007.py

        assert response.json() == {"detail": "Incorrect username or password"}
        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    def test_security_http_basic_invalid_password(client: TestClient):
        response = client.get("/users/me", auth=("stanleyjobson", "wrongpassword"))
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Dec 26 10:43:02 GMT 2025
    - 3.2K bytes
    - Click Count (0)
  4. tests/test_request_params/test_body/test_optional_list.py

        client = TestClient(app)
        response = client.post("/optional-list-str")
        assert response.status_code == 200, response.text
        assert response.json() == {"p": None}
    
    
    def test_model_optional_list_str_missing():
        client = TestClient(app)
        response = client.post("/model-optional-list-str")
        assert response.status_code == 422, response.text
        assert response.json() == {
            "detail": [
                {
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 12.7K bytes
    - Click Count (0)
  5. regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java

        Request request = new Request.Builder()
                .url(url)
                .build();
        try (Response response = client.newCall(request).execute()) {
          assertTrue(response.code() == 200 || response.code() == 404);
          assertEquals(Protocol.HTTP_2, response.protocol());
    
          for (Certificate c: response.handshake().peerCertificates()) {
            X509Certificate x = (X509Certificate) c;
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Mon Jul 26 06:37:08 GMT 2021
    - 1.9K bytes
    - Click Count (0)
  6. docs/en/docs/reference/responses.md

    # Custom Response Classes - File, HTML, Redirect, Streaming, etc.
    
    There are several custom response classes you can use to create an instance and return them directly from your *path operations*.
    
    Read more about it in the [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/).
    
    You can import them directly from `fastapi.responses`:
    
    ```python
    from fastapi.responses import (
        FileResponse,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.7K bytes
    - Click Count (0)
  7. tests/test_tutorial/test_header_params/test_tutorial003.py

    def test(path, headers, expected_status, expected_response, client: TestClient):
        response = client.get(path, headers=headers)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
            "openapi": "3.1.0",
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 4.1K bytes
    - Click Count (0)
  8. src/test/java/jcifs/internal/smb1/com/SmbComNegotiateResponseTest.java

            response.getServerData().securityMode = 1;
            response.getServerData().encryptedPasswords = true;
            response.getServerData().smaxMpxCount = 50;
            response.getServerData().maxNumberVcs = 1;
            response.getServerData().maxBufferSize = 16384;
            response.getServerData().maxRawSize = 4096;
            response.getServerData().sessKey = 0x12345678;
            response.getServerData().scapabilities = SmbConstants.CAP_UNICODE;
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 11.4K bytes
    - Click Count (0)
  9. docs_src/dependencies/tutorial002_py310.py

    
    @app.get("/items/")
    async def read_items(commons: CommonQueryParams = Depends(CommonQueryParams)):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
        response.update({"items": items})
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 624 bytes
    - Click Count (0)
  10. docs_src/dependencies/tutorial004_py310.py

            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: CommonQueryParams = Depends()):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
        response.update({"items": items})
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 607 bytes
    - Click Count (0)
Back to Top