I am trying to convert the Python request code into Nodejs, however, I cannot find the corresponding usage in Nodsjs. I want to POST request using authentication looks like this
Python code:
resp = requests.post(url, auth=HTTPBasicAuth(username, password), verify=False)
print resp.content
When I use the code in Nodejs:
request.post(url).auth('username', 'password', false);
It is not working. I have no idea how to pass the auth in the post function. Any helps