Class HttpUtils

Simple HTTP request helper to let you retrieve data from a Web server and convert it to something useful.

System.Object
  Westwind.Utilities.HttpUtils
public static class HttpUtils : object

Class Members

MemberDescription

CreateWebProxy

Helper method that creates a proxy instance to store on the Proxy property

public static IWebProxy CreateWebProxy(string proxyAddress,     bool bypassonLocal,     String[] bypassList)

DownloadImageToFile

Creates a temporary image file from a download from a URL

public static string DownloadImageToFile(string imageUrl,     string filename,     HttpRequestSettings settings)

DownloadImageToFileAsync

Creates a temporary image file from a download from a URL

public static Task DownloadImageToFileAsync(string imageUrl,     string filename,     HttpRequestSettings settings)

HttpRequestBytes

Retrieves bytes from the server without any request customizations

public static Byte[] HttpRequestBytes(string url)

public static Byte[] HttpRequestBytes(HttpRequestSettings settings)

HttpRequestBytesAsync

Retrieves bytes from the server without any request customizations

public static Task<Byte[]> HttpRequestBytesAsync(string url)

public static Task<Byte[]> HttpRequestBytesAsync(HttpRequestSettings settings)

HttpRequestString

Retrieves and Http request and returns data as a string.

public static string HttpRequestString(string url)

public static string HttpRequestString(HttpRequestSettings settings)

HttpRequestStringAsync

Retrieves and Http request and returns data as a string.

public static Task HttpRequestStringAsync(string url)

public static Task HttpRequestStringAsync(HttpRequestSettings settings)

JsonRequest

Makes an HTTP with option JSON data serialized from an object and parses the result from JSON back into an object. Assumes that the service returns a JSON response

public static TResultType JsonRequest(HttpRequestSettings settings)

JsonRequestAsync

Makes an HTTP with option JSON data serialized from an object and parses the result from JSON back into an object. Assumes that the service returns a JSON response and that any data sent is json.

public static Task JsonRequestAsync(HttpRequestSettings settings)

Requirements

Namespace: Westwind.Utilities
Assembly: westwind.utilities.dll

© West Wind Technologies, 1996-2024 • Updated: 06/29/24
Comment or report problem with topic