When we have this curl command:
curl -XPUT "https//auth.something.com"
-u "clientId:clientSecret"
What should I do to convert it into C#?
NetworkCredential myCred = new NetworkCredential(clientKey, clientSecret);
or this: https://stackoverflow.com/a/34649812/5531761
or
webClient.Headers[HttpRequestHeader.Authorization] = "Basic " + based64;
(Why should you base64 encode the Authorization header?)
Or CredentialCache (https://stackoverflow.com/a/3996838/5531761)
My curl conversion
using(var webClient = new WebClient()){
webClient.UploadString("https//auth.something.com","PUT","{ \"data\":\"dummy data\" }");
}