get_params_name = {'id_cart': ui.testNC.text(), 'ch': 1}
request_name = requests.get('сайт', headers=headers, params=get_params_name)
request_name.encoding = 'utf-8'
from requests.auth import HTTPBasicAuth
r = requests.get(url, auth=HTTPBasicAuth(login, password))
class BearerAuth(requests.auth.AuthBase):
def __init__(self, token):
self.token = token
def __call__(self, r):
r.headers["authorization"] = "Bearer " + self.token
return r
r = requests.get(url, auth=BearerAuth(my_token))