Beispiel #1
0
        // 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);
        }
Beispiel #2
0
        // 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);
        }
Beispiel #3
0
 // Token: 0x0600006B RID: 107 RVA: 0x00004268 File Offset: 0x00002468
 public static async Task <Response> DeleteAsync(string uri, string requestBody, string userhash, string xststoken, string contractVersion = "2")
 {
     return(await XBLCall.UploadBodyAsync(uri, requestBody, userhash, xststoken, contractVersion, "DELETE"));
 }
Beispiel #4
0
 // Token: 0x06000069 RID: 105 RVA: 0x00004198 File Offset: 0x00002398
 public static async Task <Response> PostAsync(string uri, string body, string userhash, string xststoken, string contractVersion = "2")
 {
     return(await XBLCall.UploadBodyAsync(uri, body, userhash, xststoken, contractVersion, "POST"));
 }