public string Get( string uri, Dictionary<string, string> headers ) { IFetcher fetcher = new FetcherSynch(); NetworkResponse networkResponse = fetcher.Fetch( uri, headers ); return networkResponse.ResponseString; }
public string Get( string uri ) { IFetcher fetcher = new FetcherSynch(); NetworkResponse networkResponse = fetcher.Fetch( uri, (Dictionary<string, string>) null ); return networkResponse.ResponseString; }
public string Get(string uri, Dictionary <string, string> headers) { IFetcher fetcher = new FetcherSynch(); NetworkResponse networkResponse = fetcher.Fetch(uri, headers); return(networkResponse.ResponseString); }
/// <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); }
/// <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); }
/// <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); }