Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 412 for Responses (0.18 sec)

  1. tests/test_tutorial/test_handling_errors/test_tutorial006.py

    
    def test_get_http_error():
        response = client.get("/items/3")
        assert response.status_code == 418, response.text
        assert response.json() == {"detail": "Nope! I don't like 3."}
    
    
    def test_get():
        response = client.get("/items/2")
        assert response.status_code == 200, response.text
        assert response.json() == {"item_id": 2}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_handling_errors/test_tutorial005.py

        )
    
    
    def test_post():
        data = {"title": "towel", "size": 5}
        response = client.post("/items/", json=data)
        assert response.status_code == 200, response.text
        assert response.json() == data
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. platforms/core-runtime/daemon-services/src/main/java/org/gradle/api/internal/tasks/userinput/DefaultUserInputReader.java

                    lock.notifyAll();
                } else {
                    if (pending != null) {
                        throw new IllegalStateException("Multiple responses received.");
                    }
                    if (finished) {
                        throw new IllegalStateException("Response received after input closed.");
                    }
                    pending = input;
                    lock.notifyAll();
                }
            }
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 04:50:46 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  4. internal/grid/README.md

        if err == nil {
            fmt.Println("Got response with field", resp["result"])
        }
    ```
    
    The wrapper will handle all serialization and de-seralization of the request and response,
    and furthermore provides reuse of the structs used for the request and response.
    
    Note that Responses sent for serialization are automatically reused for similar requests.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_query_params/test_tutorial005.py

    client = TestClient(app)
    
    
    def test_foo_needy_very():
        response = client.get("/items/foo?needy=very")
        assert response.status_code == 200
        assert response.json() == {"item_id": "foo", "needy": "very"}
    
    
    def test_foo_no_needy():
        response = client.get("/items/foo")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 4K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body_nested_models/test_tutorial009_py39.py

        data = {"2": 2.2, "3": 3.3}
        response = client.post("/index-weights/", json=data)
        assert response.status_code == 200, response.text
        assert response.json() == data
    
    
    @needs_py39
    def test_post_invalid_body(client: TestClient):
        data = {"foo": 2.2, "3": 3.3}
        response = client.post("/index-weights/", json=data)
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  7. platforms/core-runtime/daemon-services/src/main/java/org/gradle/api/internal/tasks/userinput/UserInputReader.java

     */
    
    package org.gradle.api.internal.tasks.userinput;
    
    import org.gradle.internal.service.scopes.Scope;
    import org.gradle.internal.service.scopes.ServiceScope;
    
    /**
     * Receives interactive responses from the user.
     */
    @ServiceScope(Scope.Global.class)
    public interface UserInputReader {
        /**
         * Called when the current process starts receiving user input from the client.
         */
        void startInput();
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 04:50:46 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dependencies/test_tutorial006_an_py39.py

        )
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Key header invalid"}
    
    
    @needs_py39
    def test_get_valid_headers(client: TestClient):
        response = client.get(
            "/items/",
            headers={
                "X-Token": "fake-super-secret-token",
                "X-Key": "fake-super-secret-key",
            },
        )
        assert response.status_code == 200, response.text
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  9. tests/test_regex_deprecated_params.py

        client = get_client()
        response = client.get("/items/")
        assert response.status_code == 200
        assert response.json() == "Hello World"
    
    
    @needs_py310
    def test_query_params_str_validations_q_fixedquery():
        client = get_client()
        response = client.get("/items/", params={"q": "fixedquery"})
        assert response.status_code == 200
        assert response.json() == "Hello fixedquery"
    
    
    @needs_py310
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/httpresponse/httpresponse.go

    	"golang.org/x/tools/internal/aliases"
    	"golang.org/x/tools/internal/typesinternal"
    )
    
    const Doc = `check for mistakes using HTTP responses
    
    A common mistake when using the net/http package is to defer a function
    call to close the http.Response Body before checking the error that
    determines whether the response is valid:
    
    	resp, err := http.Head(url)
    	defer resp.Body.Close()
    	if err != nil {
    		log.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 5K bytes
    - Viewed (0)
Back to top