Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions openapi_core/protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ class Request(BaseRequest, Protocol):
parameters
A RequestParameters object. Needs to supports path attribute setter
to write resolved path parameters.
body
The request body, as string.
content_type
The content type with parameters (eg, charset, boundary etc.)
and always lowercase.
body
The request body, as bytes (None if not provided).
"""

@property
Expand All @@ -70,11 +70,11 @@ class WebhookRequest(BaseRequest, Protocol):
parameters
A RequestParameters object. Needs to supports path attribute setter
to write resolved path parameters.
body
The request body, as string.
content_type
The content type with parameters (eg, charset, boundary etc.)
and always lowercase.
body
The request body, as bytes (None if not provided).
"""

@property
Expand Down Expand Up @@ -103,19 +103,16 @@ class Response(Protocol):
"""Response protocol.

Attributes:
data
The response body, as string.
status_code
The status code as integer.
headers
Response headers as Headers.
content_type
The content type with parameters and always lowercase.
data
The response body, as bytes (None if not provided).
"""

@property
def data(self) -> Optional[bytes]: ...

@property
def status_code(self) -> int: ...

Expand All @@ -124,3 +121,6 @@ def content_type(self) -> str: ...

@property
def headers(self) -> Mapping[str, Any]: ...

@property
def data(self) -> Optional[bytes]: ...