Create client for api with NetworkCredential #4161
Unanswered
SaschaHaas
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hello,
I would like to create a client including the request and response classes.
Unfortunately my url was rejected by nSwagStudion because the API service has an authentication with username and password.
Please inform me if and how an authentication can be given via nSwagStudion.
Manual login to service:
System.Net.HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(nurl);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
httpWebRequest.Credentials = new System.Net.NetworkCredential("UserName", "Password");
regards...
Beta Was this translation helpful? Give feedback.
All reactions