Skip to content Skip to sidebar Skip to footer

Unable To Pass Proper Credentials To Server Through Corporate Proxy In Python, But Able To Do It In R

I am trying to convert an R program into Python. The R program uses the following code to pass a request to the server: auth <- function() { httr::authenticate(Sys.getenv('p

Solution 1:

You can try HTTPProxyAuth

import requests
from requests.auth import HTTPProxyAuth

response = requests.post(url_base, data = url_options, auth = HTTPProxyAuth("username", "password"))

Post a Comment for "Unable To Pass Proper Credentials To Server Through Corporate Proxy In Python, But Able To Do It In R"