Skip to content

Module config.http

View Source
import requests

def request(uri: str, **kwargs) -> requests.Response:

    response = requests.get(uri, **kwargs)

    response.raise_for_status()

    return response

def post(uri: str, data: str, **kwargs) -> requests.Response:

    response = requests.post(uri, data=data, **kwargs)

    response.raise_for_status()

    return response

Functions

post

def post(
    uri: str,
    data: str,
    **kwargs
) -> requests.models.Response
View Source
def post(uri: str, data: str, **kwargs) -> requests.Response:

    response = requests.post(uri, data=data, **kwargs)

    response.raise_for_status()

    return response

request

def request(
    uri: str,
    **kwargs
) -> requests.models.Response
View Source
def request(uri: str, **kwargs) -> requests.Response:

    response = requests.get(uri, **kwargs)

    response.raise_for_status()

    return response