Exemplo n.º 1
0
        protected void Send(int i, int j, HttpClientContainer hcc)
        {
            FSending[i][j] = true;
            HttpMethod         hm  = new HttpMethod(FMethod[i][j].ToString());
            HttpRequestMessage hrm = new HttpRequestMessage(hm, FPath[i][j]);
            StringContent      sc  = new StringContent(FContentIn[i][j], Encoding.UTF8, FMediaType[i][j]);

            hrm.Content = sc;
            Task <HttpResponseMessage> requesttask = hcc.Send(hrm, FCompletion[i]);

            FTask[i][j] = requesttask;
        }
Exemplo n.º 2
0
        protected void Send(int i, int j, HttpClientContainer hcc)
        {
            FSending[i][j] = true;
            HttpMethod         hm  = new HttpMethod(FMethod[i][j].ToString());
            HttpRequestMessage hrm = new HttpRequestMessage(hm, FPath[i][j]);

            if (FMethod[i][j] != SendMethod.Get)
            {
                StringContent sc = new StringContent(FContentIn[i][j], Encoding.UTF8, FMediaType[i][j]);
                hrm.Content = sc;
            }
            var request = hcc.Send(hrm, FCompletion[i]);

            FRequest[i][j] = request;
        }