Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 87 for 201 (0.04 sec)

  1. tests/test_tutorial/test_response_change_status_code/test_tutorial001.py

        print(response.content)
        assert response.status_code == 200, response.text
        assert response.json() == "Listen to the Bar Fighters"
        response = client.put("/get-or-create-task/bar")
        assert response.status_code == 201, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Jul 09 18:06:12 UTC 2020
    - 521 bytes
    - Viewed (0)
  2. docs/pt/docs/tutorial/response-status-code.md

    * **`200`** e acima são para respostas "Bem-sucedidas". Estes são os que você mais usaria.
        * `200` é o código de status padrão, o que significa que tudo estava "OK".
        * Outro exemplo seria `201`, "Criado". É comumente usado após a criação de um novo registro no banco de dados.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_additional_status_codes/test_tutorial001.py

        assert response.json() == {"name": "Wrestlers", "size": None}
    
    
    def test_create():
        response = client.put("/items/red", json={"name": "Chillies"})
        assert response.status_code == 201, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Jul 09 18:06:12 UTC 2020
    - 546 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_additional_status_codes/test_tutorial001_an.py

        assert response.json() == {"name": "Wrestlers", "size": None}
    
    
    def test_create():
        response = client.put("/items/red", json={"name": "Chillies"})
        assert response.status_code == 201, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 549 bytes
    - Viewed (0)
  5. tests/test_tutorial/test_additional_status_codes/test_tutorial001_an_py310.py

        assert response.json() == {"name": "Wrestlers", "size": None}
    
    
    @needs_py310
    def test_create(client: TestClient):
        response = client.put("/items/red", json={"name": "Chillies"})
        assert response.status_code == 201, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 741 bytes
    - Viewed (0)
  6. docs/em/docs/advanced/response-change-status-code.md

    ✋️ 💼 👆 💪 📨 🎏 👔 📟 🌘 🔢.
    
    ## ⚙️ 💼
    
    🖼, 🌈 👈 👆 💚 📨 🇺🇸🔍 👔 📟 "👌" `200` 🔢.
    
    ✋️ 🚥 💽 🚫 🔀, 👆 💚 ✍ ⚫️, & 📨 🇺🇸🔍 👔 📟 "✍" `201`.
    
    ✋️ 👆 💚 💪 ⛽ & 🗜 💽 👆 📨 ⏮️ `response_model`.
    
    📚 💼, 👆 💪 ⚙️ `Response` 🔢.
    
    ## ⚙️ `Response` 🔢
    
    👆 💪 📣 🔢 🆎 `Response` 👆 *➡ 🛠️ 🔢* (👆 💪 🍪 & 🎚).
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  7. docs/de/docs/advanced/response-change-status-code.md

    ## Anwendungsfall
    
    Stellen Sie sich zum Beispiel vor, Sie möchten standardmäßig den HTTP-Statuscode „OK“ `200` zurückgeben.
    
    Wenn die Daten jedoch nicht vorhanden waren, möchten Sie diese erstellen und den HTTP-Statuscode „CREATED“ `201` zurückgeben.
    
    Sie möchten aber dennoch in der Lage sein, die von Ihnen zurückgegebenen Daten mit einem `response_model` zu filtern und zu konvertieren.
    
    In diesen Fällen können Sie einen `Response`-Parameter verwenden.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

          }
    
          override fun writeTo(sink: BufferedSink) {
            sink.writeUtf8("<element/>")
            sink.flush()
          }
        }
    
        server.enqueue(MockResponse(code = 201))
        server.enqueue(MockResponse(code = 204))
        server.enqueue(MockResponse(code = 204))
    
        val endpointUrl = server.url("/endpoint")
    
        var request =
          Request.Builder()
            .url(endpointUrl)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/additional-status-codes.md

    But you also want it to accept new items. And when the items didn't exist before, it creates them, and returns an HTTP status code of 201 "Created".
    
    To achieve that, import `JSONResponse`, and return your content there directly, setting the `status_code` that you want:
    
    {* ../../docs_src/additional_status_codes/tutorial001_an_py310.py hl[4,25] *}
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 16:12:23 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  10. compat/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java

            checkVersionsOrder("1.0.0", "1.0-1");
    
            checkVersionsOrder("2.0-1", "2.0.1");
            checkVersionsOrder("2.0.1-klm", "2.0.1-lmn");
            checkVersionsOrder("2.0.1", "2.0.1-xyz");
    
            checkVersionsOrder("2.0.1", "2.0.1-123");
            checkVersionsOrder("2.0.1-xyz", "2.0.1-123");
        }
    
        @Test
        void testLeadingZeroes() {
            checkVersionsOrder("0.7", "2");
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 14K bytes
    - Viewed (0)
Back to top