import requests
      from requests.auth import HTTPBasicAuth
      
      response = requests.get(url, auth = HTTPBasicAuth(username, password))
      if reponse.status_code == 200:
        response_text = response.text
        response_json = response.json()
      
      Python language logo

      Get request with auth

      Python public recipes

      Shortcut: requests.get.basic-auth

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.