Skip to content

Confusion with the Request.body type #828

Closed
@p1c2u

Description

@p1c2u

Discussed in #824

Originally posted by berislavlopac April 6, 2024
On this line:

def body(self) -> Optional[bytes]: ...

the type of the BaseRequest.body property is defined as Optional[bytes]; however, the docstring of the Request protocol (which inherits body from BaseRequest) says:

    body
       The request body, as string.

I'm currently having some issue with the validation, but it's not clear which direction should I go with the solution -- should body be bytes or str? Have I missed something? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy