Guest User

Untitled

a guest
Jan 23rd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. //Authentication
  2. var plainTextBytes = System.Text.Encoding.UTF8.GetBytes("abc:def");
  3. string encodedAuth = System.Convert.ToBase64String(plainTextBytes);
  4. request_.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", encodedAuth);
  5.  
  6. "securityDefinitions": {
  7. "basic": {
  8. "type": "basic",
  9. "description": "Basic HTTP Authentication"
  10. }
  11. }, "security": [{
  12. "basic": []
  13. }
  14. ]
Add Comment
Please, Sign In to add comment