Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 322 for handling (0.22 sec)

  1. src/archive/zip/example_test.go

    	var files = []struct {
    		Name, Body string
    	}{
    		{"readme.txt", "This archive contains some text files."},
    		{"gopher.txt", "Gopher names:\nGeorge\nGeoffrey\nGonzo"},
    		{"todo.txt", "Get animal handling licence.\nWrite more examples."},
    	}
    	for _, file := range files {
    		f, err := w.Create(file.Name)
    		if err != nil {
    			log.Fatal(err)
    		}
    		_, err = f.Write([]byte(file.Body))
    		if err != nil {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Jan 27 00:22:03 GMT 2016
    - 2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_handling_errors/test_tutorial003.py

    from fastapi.testclient import TestClient
    
    from docs_src.handling_errors.tutorial003 import app
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/unicorns/shinny")
        assert response.status_code == 200, response.text
        assert response.json() == {"unicorn_name": "shinny"}
    
    
    def test_get_exception():
        response = client.get("/unicorns/yolo")
        assert response.status_code == 418, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_handling_errors/test_tutorial004.py

    from fastapi.testclient import TestClient
    
    from docs_src.handling_errors.tutorial004 import app
    
    client = TestClient(app)
    
    
    def test_get_validation_error():
        response = client.get("/items/foo")
        assert response.status_code == 400, response.text
        # TODO: remove when deprecating Pydantic v1
        assert (
            # TODO: remove when deprecating Pydantic v1
            "path -> item_id" in response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  4. src/cmd/asm/internal/arch/arm.go

    // one of the comparison instructions that require special handling.
    func IsARMCMP(op obj.As) bool {
    	switch op {
    	case arm.ACMN, arm.ACMP, arm.ATEQ, arm.ATST:
    		return true
    	}
    	return false
    }
    
    // IsARMSTREX reports whether the op (as defined by an arm.A* constant) is
    // one of the STREX-like instructions that require special handling.
    func IsARMSTREX(op obj.As) bool {
    	switch op {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Nov 18 17:59:44 GMT 2022
    - 6.1K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/events.md

    Because this code is executed before the application **starts** taking requests, and right after it **finishes** handling requests, it covers the whole application **lifespan** (the word "lifespan" will be important in a second 😉).
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_handling_errors/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.handling_errors.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_get_item():
        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"item": "The Foo Wrestlers"}
    
    
    def test_get_item_not_found():
        response = client.get("/items/bar")
        assert response.status_code == 404, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/websockets.md

    !!! tip
        Notice that the query `token` will be handled by a dependency.
    
    With that you can connect the WebSocket and then send and receive messages:
    
    <img src="/img/tutorial/websockets/image05.png">
    
    ## Handling disconnections and multiple clients
    
    When a WebSocket connection is closed, the `await websocket.receive_text()` will raise a `WebSocketDisconnect` exception, which you can then catch and handle like in this example.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/dependencies/dependencies-with-yield.md

    👆 👀 👈 👆 💪 ⚙️ 🔗 ⏮️ `yield` &amp; ✔️ `try` 🍫 👈 ✊ ⚠.
    
    ⚫️ 5️⃣📆 😋 🤚 `HTTPException` ⚖️ 🎏 🚪 📟, ⏮️ `yield`. ✋️ **⚫️ 🏆 🚫 👷**.
    
    🚪 📟 🔗 ⏮️ `yield` 🛠️ *⏮️* 📨 📨, [⚠ 🐕‍🦺](../handling-errors.md#_4){.internal-link target=_blank} 🔜 ✔️ ⏪ 🏃. 📤 🕳 😽 ⚠ 🚮 👆 🔗 🚪 📟 (⏮️ `yield`).
    
    , 🚥 👆 🤚 `HTTPException` ⏮️ `yield`, 🔢 (⚖️ 🙆 🛃) ⚠ 🐕‍🦺 👈 ✊ `HTTPException`Ⓜ &amp; 📨 🇺🇸🔍 4️⃣0️⃣0️⃣ 📨 🏆 🚫 📤 ✊ 👈 ⚠ 🚫🔜.
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  9. internal/amztime/parse.go

    import (
    	"errors"
    	"net/http"
    	"time"
    )
    
    // Supported amz date formats.
    var amzDateFormats = []string{
    	// Do not change this order, x-amz-date format is usually in
    	// iso8601Format rest are meant for relaxed handling of other
    	// odd SDKs that might be out there.
    	"20060102T150405Z",
    	time.RFC1123,
    	time.RFC1123Z,
    	// Add new AMZ date formats here.
    }
    
    // ErrMalformedDate always returned for dates that cannot be parsed.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  10. guava/src/com/google/common/base/Objects.java

       * Arrays#hashCode(Object[])}. Note that array arguments to this method, with the exception of a
       * single Object array, do not get any special handling; their hash codes are based on identity
       * and not contents.
       *
       * <p>This is useful for implementing {@link Object#hashCode()}. For example, in an object that
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 2.9K bytes
    - Viewed (0)
Back to top