Skip to content

Commit

Permalink
feat: Add emulated urequests.post function.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjw committed Nov 30, 2023
1 parent 2b23191 commit aceb8b0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion i75/emulated/urequests.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import requests
try:
from typing import Dict, Optional
except ImportError:
pass


def get(url) -> requests.Response:
def get(url: str) -> requests.Response:
return requests.get(url)


def post(url: str,
headers: Optional[Dict[str, str]]=None,
data: Optional[str]=None) -> requests.Response:
return requests.post(url, headers=headers, data=data)

0 comments on commit aceb8b0

Please sign in to comment.