Пример #1
0
        public NASA_PACKET_INFO Get(String QueryString)
        {
            SecurityProtocolType lastSecureProtocol = ServicePointManager.SecurityProtocol;

            ServicePointManager.SecurityProtocol = SecureProtocolType;
            using (Ajax NetasyncAjax = new Ajax(HttpAddr, Encoding.Unicode, SecureCookieContainer, AjaxType.AjaxGET))
            {
                NASA_PACKET_INFO packetInfo = new NASA_PACKET_INFO();
                packetInfo.PacketDataType = NASA_DATA_TYPE.NASA_DATA_STRING;
                try
                {
                    packetInfo.PacketData   = NetasyncAjax.Send(QueryString);
                    packetInfo.PacketStatus = NASA_STATUS.NASA_REQUEST_SUCCESS;
                    NasaRequestStatus       = NASA_STATUS.NASA_REQUEST_SUCCESS;
                }
                catch
                {
                    packetInfo.PacketStatus = NASA_STATUS.NASA_REQUEST_UNSUCCESSFUL;
                    NasaRequestStatus       = NASA_STATUS.NASA_REQUEST_UNSUCCESSFUL;
                }
                ServicePointManager.SecurityProtocol = lastSecureProtocol;
                return(packetInfo);
            }
        }