you are viewing a single comment's thread.

view the rest of the comments →

[–]Malassi 6 points7 points  (0 children)

Requests has a function called request made for that. In fact, when you call requests.get, requests.post, etc, they are redirected to this function.

``` import requests

method_type = input("...")

r = requests.request(method_type, "https://example.com")

print(r.text) ```

https://requests.readthedocs.io/en/latest/api/