Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for rawBody (0.12 sec)

  1. docs_src/path_operation_advanced_configuration/tutorial007.py

                "content": {"application/x-yaml": {"schema": Item.model_json_schema()}},
                "required": True,
            },
        },
    )
    async def create_item(request: Request):
        raw_body = await request.body()
        try:
            data = yaml.safe_load(raw_body)
        except yaml.YAMLError:
            raise HTTPException(status_code=422, detail="Invalid YAML")
        try:
            item = Item.model_validate(data)
        except ValidationError as e:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 822 bytes
    - Viewed (0)
  2. docs_src/path_operation_advanced_configuration/tutorial007_pv1.py

                "content": {"application/x-yaml": {"schema": Item.schema()}},
                "required": True,
            },
        },
    )
    async def create_item(request: Request):
        raw_body = await request.body()
        try:
            data = yaml.safe_load(raw_body)
        except yaml.YAMLError:
            raise HTTPException(status_code=422, detail="Invalid YAML")
        try:
            item = Item.parse_obj(data)
        except ValidationError as e:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 789 bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ir/mini.go

    // at a cost of 8 bytes.
    //
    // A miniNode is NOT a valid Node by itself: the embedding struct
    // must at the least provide:
    //
    //	func (n *MyNode) String() string { return fmt.Sprint(n) }
    //	func (n *MyNode) rawCopy() Node { c := *n; return &c }
    //	func (n *MyNode) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) }
    //
    // The embedding struct should also fill in n.op in its constructor,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 31 22:09:44 UTC 2022
    - 2.8K bytes
    - Viewed (0)
Back to top