Esempio n. 1
0
        public void DownloadStringAsync(HttpRequestMessage message)
        {
            this.Headers.Add(message.Headers);

            if (string.IsNullOrEmpty(message.HttpMethod))
            {
                message.HttpMethod = this.HttpMethod;
            }
            this.DownloadStringAsync(new System.Uri(this.Url));
        }
Esempio n. 2
0
        public string DownloadString(HttpRequestMessage message)
        {
            this.Headers.Add(message.Headers);

            if (string.IsNullOrEmpty(message.HttpMethod))
            {
                message.HttpMethod = this.HttpMethod;
            }
            return this.DownloadString(message.Uri);
        }
Esempio n. 3
0
        public byte[] UploadData(HttpRequestMessage message)
        {
            this.Headers.Add(message.Headers);

            if (string.IsNullOrEmpty(message.HttpMethod))
            {
                message.HttpMethod = this.HttpMethod;
            }

            return this.UploadData(message.Uri, message.HttpMethod, message.Body);
        }
Esempio n. 4
0
        public void UploadDataAsync(HttpRequestMessage message)
        {
            this.Headers.Add(message.Headers);

            if (string.IsNullOrEmpty(message.HttpMethod))
            {
                message.HttpMethod = this.HttpMethod;
            }

            this.UploadDataAsync(new System.Uri(message.Uri), message.HttpMethod, message.Body);
        }