Esempio n. 1
0
        public void down_excel(string lg, string id, string start_time, string host, string client)
        {
            Request  request  = HttpSocketHelper.get_request_500_excel(id);
            Response response = HttpSocketHelper.get_response(request);

            HttpSocketHelper.save_file_from_response(response, @"c:\data\" + id + ".xls");
        }
Esempio n. 2
0
    public void get_response(string url, string method, Hashtable hash_post, Hashtable hash_cookie)
    {
        Session session = new Session();

        Request request = HttpSocketHelper.get_reqeust(url, method, hash_post, hash_cookie);

        session.request      = request;
        session.request_time = DateTime.Now;
        Response response = HttpSocketHelper.get_response(request);

        session.response = response;

        this.sessions.Add(session);

        foreach (string item in response.set_cookie)
        {
            cookie = HttpSocketHelper.add_string_to_cookie(item, cookie);
        }
    }