// Token: 0x06000068 RID: 104 RVA: 0x0000413C File Offset: 0x0000233C public static async Task <Response> GetAsync(string uri, string userhash, string xststoken, string contractVersion = "2") { Response resp = new Response(); WebClient wc = XBLCall.CreateWCForCall(userhash, xststoken, contractVersion); byte[] array4 = await wc.DownloadDataTaskAsync(uri); byte[] array2 = array4; array4 = null; byte[] array3 = array2; array2 = null; byte[] responseBuffer = array3; array3 = null; resp.responseBody = Encoding.UTF8.GetString(responseBuffer, 0, responseBuffer.Length); resp.valid = true; return(resp); }
// Token: 0x0600006A RID: 106 RVA: 0x000041FC File Offset: 0x000023FC public static async Task <Response> UploadBodyAsync(string uri, string requestBody, string userhash, string xststoken, string contractVersion = "2", string method = "POST") { Response resp = new Response(); try { WebClient wc = XBLCall.CreateWCForCall(userhash, xststoken, contractVersion); byte[] postBuffer = Encoding.UTF8.GetBytes(requestBody); byte[] array4 = await wc.UploadDataTaskAsync(uri, method, postBuffer); byte[] array2 = array4; array4 = null; byte[] array3 = array2; array2 = null; byte[] responseBuffer = array3; array3 = null; resp.responseBody = Encoding.UTF8.GetString(responseBuffer, 0, responseBuffer.Length); resp.valid = true; wc = null; postBuffer = null; responseBuffer = null; wc = null; postBuffer = null; array3 = null; responseBuffer = null; wc = null; postBuffer = null; array2 = null; array3 = null; responseBuffer = null; } catch (Exception e) { throw e; } return(resp); }