예제 #1
0
        public string Get( string uri, Dictionary<string, string> headers )
        {
            IFetcher fetcher = new FetcherSynch();
            NetworkResponse networkResponse = fetcher.Fetch( uri, headers );

            return networkResponse.ResponseString;
        }
예제 #2
0
        public string Get( string uri )
        {
            IFetcher fetcher = new FetcherSynch();
            NetworkResponse networkResponse = fetcher.Fetch( uri, (Dictionary<string, string>) null  );

            return networkResponse.ResponseString;
        }
예제 #3
0
        public string Get(string uri, Dictionary <string, string> headers)
        {
            IFetcher        fetcher         = new FetcherSynch();
            NetworkResponse networkResponse = fetcher.Fetch(uri, headers);

            return(networkResponse.ResponseString);
        }
예제 #4
0
        /// <summary>
        /// Returns the response bytes of the specified URI.
        /// </summary>
        /// <param name="uri">The URI to get the response bytes of.</param>
        /// <returns></returns>
        public byte[] GetBytes(string uri)
        {
            IFetcher        fetcher         = new FetcherSynch();
            NetworkResponse networkResponse = fetcher.Fetch(uri, (Dictionary <string, string>)null, 60000);

            return(networkResponse.ResponseBytes);
        }
예제 #5
0
        /// <summary>
        /// Returns the response string of the specified URI.
        /// </summary>
        /// <param name="uri">The URI to get the response string of.</param>
        /// <param name="timeout">The timeout value in milliseconds.</param>
        public string Get(string uri, int timeout)
        {
            IFetcher        fetcher         = new FetcherSynch();
            NetworkResponse networkResponse = fetcher.Fetch(uri, (Dictionary <string, string>)null, timeout);

            return(networkResponse.ResponseString);
        }
예제 #6
0
        /// <summary>
        /// Returns the response bytes of the specified URI.
        /// </summary>
        /// <param name="uri">The URI to get the response bytes of.</param>
        /// <param name="headers">The headers for the request.</param>
        /// <param name="timeout">The timeout value in milliseconds.</param>
        /// <returns>
        /// A byte array representing the response.
        /// </returns>
        public byte[] GetBytes(string uri, Dictionary <string, string> headers, int timeout)
        {
            IFetcher        fetcher         = new FetcherSynch();
            NetworkResponse networkResponse = fetcher.Fetch(uri, headers, timeout);

            return(networkResponse.ResponseBytes);
        }