Yogesh Ghorpade

Yogesh Ghorpade

  • NA
  • 762
  • 147.8k

I Want To Convert This Code In To c#

Mar 5 2019 12:54 AM
Hellio Friends I Want To Convert This Code Into C# Please Help Me For This
Code : - 
 
var loginUrl = 'loginAPI';
var username = 'UserName' || ''
var lowercaseUsername = username && username.toLowerCase()
var password = 'Password' || ''
var body = {
username: lowercaseUsername,
password: password
};
body = JSON.stringify(body);
fetch(loginUrl, {
method: 'post',
headers: {
'content-type': 'application/json'
},
body: body
}).then(function (response) {
return response.json();
}).then(function (data) {
// alert(data.idToken);
document.getElementById('Token').innerHTML = data.idToken;
});
 

Answers (7)