I'm a beginner and I want to write a Nim-application that processes some data from an internal website. Basic authentication (username, password) is required to access this site.
A working Python solution is:
response = requests.get('https://internal:PORT/page',
auth=('user', 'passwd'),
verify=False) # this is vital
Based on the nim doc regarding httpclient and the modules source code, where it is stated that one could use a proxy as an argument for any of the functions, I've been trying something along these lines:
var
client = newHttpClient()
prox = newProxy("https://internal:PORT/page", "user:passwd")
let response = client.getContent(prox) # Error: type mismatch
The solution is probably very obvious but I'm out of ideas on how to authenticate.
If anybody could help, that'd be highly appreciated!