-
-
Save shahriarhossain/b2997b463ba46b7995b4 to your computer and use it in GitHub Desktop.
Extracted class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FileLogger | |
{ | |
public void Log(string exceptionMsg) | |
{ | |
using (StreamWriter file = new StreamWriter("c:\\log.txt",true) | |
{ | |
file.WriteLine(exceptionMsg.ToString()); | |
} | |
} | |
} | |
public static class Authenticate | |
{ | |
public static void ClientAuthentication(HttpClient client) | |
{ | |
client.DefaultRequestHeaders.Accept.Clear(); | |
client.DefaultRequestHeaders.Authorization = | |
new AuthenticationHeaderValue("Basic", Authenticate.FeatchApiKey()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment