Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for post$index (0.62 sec)

  1. tests/test_tutorial/test_body_nested_models/test_tutorial009.py

    
    def test_post_body(client: TestClient):
        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
    
    
    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
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_body_nested_models/test_tutorial009_py39.py

    @needs_py39
    def test_post_body(client: TestClient):
        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
    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. docs_src/body_nested_models/tutorial009.py

    from typing import Dict
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.post("/index-weights/")
    async def create_index_weights(weights: Dict[int, float]):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 179 bytes
    - Viewed (0)
  4. docs_src/body_nested_models/tutorial009_py39.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.post("/index-weights/")
    async def create_index_weights(weights: dict[int, float]):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 154 bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/app/web/api/admin/general/ApiAdminGeneralAction.java

            return asJson(new ApiConfigResponse().setting(form).status(Status.OK).result());
        }
    
        // POST /api/admin/general
        @Execute
        public JsonResponse<ApiResult> post$index(final EditBody body) {
            validateApi(body, messages -> {});
            final EditBody newBody = new EditBody();
            AdminGeneralAction.updateForm(fessConfig, newBody);
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  6. pkg/test/echo/cmd/server/main.go

    				xdsGRPCByPort[p] = true
    			}
    			portIndex := 0
    			for i, p := range httpPorts {
    				ports[portIndex] = &common.Port{
    					Name:        "http-" + strconv.Itoa(i),
    					Protocol:    protocol.HTTP,
    					Port:        p,
    					TLS:         tlsByPort[p],
    					ServerFirst: serverFirstByPort[p],
    				}
    				portIndex++
    			}
    			for i, p := range grpcPorts {
    				ports[portIndex] = &common.Port{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go

    				return ErrInvalidLengthGenerated
    			}
    			postIndex := iNdEx + intStringLen
    			if postIndex > l {
    				return io.ErrUnexpectedEOF
    			}
    			s := string(data[iNdEx:postIndex])
    
    			// BEGIN CUSTOM DECODE
    			p, err := ParseQuantity(s)
    			if err != nil {
    				return err
    			}
    			*m = p
    			// END CUSTOM DECODE
    
    			iNdEx = postIndex
    		default:
    			iNdEx = preIndex
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 21 05:31:33 UTC 2021
    - 6K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go

    			if intStringLen < 0 {
    				return ErrInvalidLengthGenerated
    			}
    			postIndex := iNdEx + intStringLen
    			if postIndex < 0 {
    				return ErrInvalidLengthGenerated
    			}
    			if postIndex > l {
    				return io.ErrUnexpectedEOF
    			}
    			m.StrVal = string(dAtA[iNdEx:postIndex])
    			iNdEx = postIndex
    		default:
    			iNdEx = preIndex
    			skippy, err := skipGenerated(dAtA[iNdEx:])
    			if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:37 UTC 2024
    - 9.5K bytes
    - Viewed (0)
Back to top