Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Fixed
- Change HTTP method strings to uppercase @fitudao3788

### Added

Expand Down
4 changes: 2 additions & 2 deletions zendriver/core/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,10 +839,10 @@ async def get(self, endpoint: str) -> Any:
return await self._request(endpoint)

async def post(self, endpoint: str, data: dict[str, str]) -> Any:
return await self._request(endpoint, method="post", data=data)
return await self._request(endpoint, method="POST", data=data)

async def _request(
self, endpoint: str, method: str = "get", data: dict[str, str] | None = None
self, endpoint: str, method: str = "GET", data: dict[str, str] | None = None
) -> Any:
url = urllib.parse.urljoin(
self.api, f"json/{endpoint}" if endpoint else "/json"
Expand Down