Skip to content

Instantly share code, notes, and snippets.

@shahriarhossain
Last active January 11, 2016 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shahriarhossain/b2997b463ba46b7995b4 to your computer and use it in GitHub Desktop.
Save shahriarhossain/b2997b463ba46b7995b4 to your computer and use it in GitHub Desktop.
Extracted class
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