wasSharp
/Strings.cs |
@@ -6,6 +6,7 @@ |
|
using System.IO; |
using System.Linq; |
using System.Text; |
|
namespace wasSharp |
{ |
@@ -23,5 +24,20 @@ |
{ |
return paths.Aggregate((x, y) => Path.Combine(x, y)); |
} |
|
/// <summary> |
/// Converts a byte array to a hexadecimal string. |
/// </summary> |
/// <param name="bytes"></param> |
/// <returns></returns> |
public static string ToHexString(this byte[] bytes) |
{ |
StringBuilder str = new StringBuilder(); |
|
for (int i = 0; i < bytes.Length; i++) |
str.AppendFormat("{0:X2}", bytes[i]); |
|
return str.ToString(); |
} |
} |
} |
/Web/wasHTTPClient.cs |
@@ -34,6 +34,11 @@ |
{ |
} |
|
public wasHTTPClient(ProductInfoHeaderValue userAgent, string mediaType) |
: this(userAgent, new CookieContainer(), mediaType, null, null, 60000) |
{ |
} |
|
public wasHTTPClient(ProductInfoHeaderValue userAgent, CookieContainer cookieContainer, string mediaType, |
AuthenticationHeaderValue authentication, Dictionary<string, string> headers, uint timeout) |
{ |