I can't figure out how to set the -u / --user property of the HttpWebRequest request. My goal here is to set the --user to an api key I have, similar to the command
curl https://api.stripe.com/v1/customers?limit=3 -u api_key***************:
I have tried setting the UserAgent propety instead, but it doesn't work:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(endpoint);
request.UserAgent = "api_key***************:";
I am trying to get a JSON response from a web API that requires an API key in the -u part. Thanks to anyone who can help.