WebRequest Class
A download request for use with the ReadWeb module.
Namespace
Statiq.Core
Base Types
  • object
graph BT Type-->Base0["object"] Type["WebRequest"] class Type type-node

Syntax

public class WebRequest

Constructors

Name Summary
WebRequest(string) Creates a new download request.
WebRequest(Uri) Creates a new download request.

Properties

Name Property Type Summary
Content HttpContent
The content of the request (has no effect for some methods like GET).
Credentials NetworkCredential
The network credentials to use for the request.
Headers WebRequestHeaders
Request headers.
Method HttpMethod
The method to use.
QueryString IDictionary<string, string>
The query string parameters. These will be combined with any that already exist in Uri.
Uri Uri
The URI to download from.

Methods

Name Return Value Summary
WithContent(HttpContent) WebRequest
Sets the content of the request (only applicable to some request methods).
WithContent(string) WebRequest
Sets the string content of the request (only applicable to some request methods).
WithCredentials(NetworkCredential) WebRequest
Sets the credentials to use for the request.
WithCredentials(string, string) WebRequest
Sets the credentials to use for the request.
WithHeaders(WebRequestHeaders) WebRequest
Sets the request headers.
WithMethod(HttpMethod) WebRequest
Sets the request method.
WithQueryString(string, string) WebRequest
Sets a query string value.

Extension Methods