Generic
This guide demonstrates how to use the GenericRESTAPI
client to interact with any generic REST API endpoint.
Connect to a generic API
from wingpy import GenericRESTAPI
generic = GenericRESTAPI(
base_url="https://httpbin.org",
)
generic.headers = {"Authorization": "Bearer my_token"}
POST /post
data = {"key": "value"}
response = generic.post("/post", data=data)
print(response.json())