C# Class org.GraphDefined.Vanaheimr.Hermod.HTTP.HTTPRequestBuilder

A read-write HTTP request header.
Inheritance: AHTTPPDUBuilder
Exibir arquivo Open project: Vanaheimr/Hermod Class Usage Examples

Public Methods

Method Description
AddAccept ( AcceptType AcceptType ) : HTTPRequestBuilder

Add an AcceptType to the Accept header field.

AddAccept ( HTTPContentType HTTPContentType, Double Quality = 1 ) : HTTPRequestBuilder

Add a HTTPContentType and its quality to the Accept header field.

AsImmutable ( ) : HTTPRequest

Converts this HTTPRequestBuilder into an immutable HTTPRequest.

ExecuteReturnResult ( ) : Task
HTTPRequestBuilder ( HTTPClient Client ) : System

Create a new HTTP request.

HTTPRequestBuilder ( HTTPRequest OtherHTTPRequest ) : System

Create a new HTTP request.

Set ( String Field, Object Value ) : void
SetAcceptCharset ( String AcceptCharset ) : HTTPRequestBuilder

Set the HTTP Accept-Charset header field.

SetAcceptEncoding ( String AcceptEncoding ) : HTTPRequestBuilder

Set the HTTP Accept-Encoding header field.

SetAcceptLanguage ( String AcceptLanguage ) : HTTPRequestBuilder

Set the HTTP Accept-Language header field.

SetAcceptRanges ( String AcceptRanges ) : HTTPRequestBuilder

Set the HTTP Accept-Language header field.

SetAuthorization ( HTTPBasicAuthentication Authorization ) : HTTPRequestBuilder

Set the HTTP Authorization header field.

SetCacheControl ( String CacheControl ) : HTTPRequestBuilder

Set the HTTP CacheControl header field.

SetConnection ( String Connection ) : HTTPRequestBuilder

Set the HTTP connection header field.

SetContent ( Byte ByteArray ) : HTTPRequestBuilder

The HTTP content/body.

SetContent ( Stream ContentStream ) : HTTPRequestBuilder

The HTTP content/body as a stream.

SetContent ( String String ) : HTTPRequestBuilder

The HTTP content/body.

SetContentEncoding ( Encoding ContentEncoding ) : HTTPRequestBuilder

Set the HTTP Content-Encoding header field.

SetContentLanguage ( List ContentLanguages ) : HTTPRequestBuilder

Set the HTTP Content-Languages header field.

SetContentLength ( System.UInt64 ContentLength ) : HTTPRequestBuilder

Set the HTTP Content-Length.

SetContentLocation ( String ContentLocation ) : HTTPRequestBuilder

Set the HTTP ContentLocation header field.

SetContentMD5 ( String ContentMD5 ) : HTTPRequestBuilder

Set the HTTP ContentMD5 header field.

SetContentRange ( String ContentRange ) : HTTPRequestBuilder

Set the HTTP ContentRange header field.

SetContentType ( HTTPContentType ContentType ) : HTTPRequestBuilder

Set the HTTP Content-Type header field.

SetCookie ( String Cookie ) : HTTPRequestBuilder

Set the HTTP Cookie header field.

SetDate ( System.DateTime Date ) : HTTPRequestBuilder

Set the HTTP Date header field.

SetDepth ( String Depth ) : HTTPRequestBuilder

Set the HTTP Depth header field.

SetExpect ( String Expect ) : HTTPRequestBuilder

Set the HTTP Expect header field.

SetFrom ( String From ) : HTTPRequestBuilder

Set the HTTP From header field.

SetHTTPMethod ( HTTPMethod HTTPMethod ) : HTTPRequestBuilder

Set the HTTP method.

SetHTTPStatusCode ( HTTPStatusCode HTTPStatusCode ) : HTTPRequestBuilder

Set the HTTP status code.

SetHost ( String Host ) : HTTPRequestBuilder

Set the HTTP Host header field.

SetIf ( String If ) : HTTPRequestBuilder

Set the HTTP If header field.

SetIfMatch ( String IfMatch ) : HTTPRequestBuilder

Set the HTTP If-Match header field.

SetIfModifiedSince ( String IfModifiedSince ) : HTTPRequestBuilder

Set the HTTP If-Modified-Since header field.

SetIfNoneMatch ( String IfNoneMatch ) : HTTPRequestBuilder

Set the HTTP If-None-Match header field.

SetIfRange ( String IfRange ) : HTTPRequestBuilder

Set the HTTP If-Range header field.

SetIfUnmodifiedSince ( String IfUnmodifiedSince ) : HTTPRequestBuilder

Set the HTTP If-Unmodified-Since header field.

SetLastEventId ( System.UInt64 LastEventId ) : HTTPRequestBuilder

Set the HTTP Last-Event-Id header field.

SetLockToken ( String LockToken ) : HTTPRequestBuilder

Set the HTTP LockToken header field.

SetMaxForwards ( System.UInt64 MaxForwards ) : HTTPRequestBuilder

Set the HTTP Max-Forwards header field.

SetOverwrite ( String Overwrite ) : HTTPRequestBuilder

Set the HTTP Overwrite header field.

SetProtocolName ( String ProtocolName ) : HTTPRequestBuilder

Set the protocol name.

SetProtocolVersion ( HTTPVersion ProtocolVersion ) : HTTPRequestBuilder

Set the protocol version.

SetProxyAuthorization ( String ProxyAuthorization ) : HTTPRequestBuilder

Set the HTTP Proxy-Authorization header field.

SetRange ( String Range ) : HTTPRequestBuilder

Set the HTTP Range header field.

SetReferer ( String Referer ) : HTTPRequestBuilder

Set the HTTP Referer header field.

SetTE ( String TE ) : HTTPRequestBuilder

Set the HTTP TE header field.

SetTimeout ( System.UInt64 Timeout ) : HTTPRequestBuilder

Set the HTTP Timeout header field.

SetURI ( String URI ) : HTTPRequestBuilder

Set the HTTP method.

SetUserAgent ( String UserAgent ) : HTTPRequestBuilder

Set the HTTP User-Agent header field.

SetVia ( String Via ) : HTTPRequestBuilder

Set the HTTP Via header field.

Protected Methods

Method Description
PrepareImmutability ( ) : void

Prepares the immutability of an HTTP PDU, e.g. calculates and set the Content-Length header.

Method Details

AddAccept() public method

Add an AcceptType to the Accept header field.
public AddAccept ( AcceptType AcceptType ) : HTTPRequestBuilder
AcceptType AcceptType An AcceptType.
return HTTPRequestBuilder

AddAccept() public method

Add a HTTPContentType and its quality to the Accept header field.
public AddAccept ( HTTPContentType HTTPContentType, Double Quality = 1 ) : HTTPRequestBuilder
HTTPContentType HTTPContentType A HTTPContentType.
Quality Double The quality of the HTTPContentType.
return HTTPRequestBuilder

AsImmutable() public method

Converts this HTTPRequestBuilder into an immutable HTTPRequest.
public AsImmutable ( ) : HTTPRequest
return HTTPRequest

ExecuteReturnResult() public method

public ExecuteReturnResult ( ) : Task
return Task

HTTPRequestBuilder() public method

Create a new HTTP request.
public HTTPRequestBuilder ( HTTPClient Client ) : System
Client HTTPClient
return System

HTTPRequestBuilder() public method

Create a new HTTP request.
public HTTPRequestBuilder ( HTTPRequest OtherHTTPRequest ) : System
OtherHTTPRequest HTTPRequest
return System

PrepareImmutability() protected method

Prepares the immutability of an HTTP PDU, e.g. calculates and set the Content-Length header.
protected PrepareImmutability ( ) : void
return void

Set() public method

public Set ( String Field, Object Value ) : void
Field String
Value Object
return void

SetAcceptCharset() public method

Set the HTTP Accept-Charset header field.
public SetAcceptCharset ( String AcceptCharset ) : HTTPRequestBuilder
AcceptCharset String AcceptCharset.
return HTTPRequestBuilder

SetAcceptEncoding() public method

Set the HTTP Accept-Encoding header field.
public SetAcceptEncoding ( String AcceptEncoding ) : HTTPRequestBuilder
AcceptEncoding String AcceptEncoding.
return HTTPRequestBuilder

SetAcceptLanguage() public method

Set the HTTP Accept-Language header field.
public SetAcceptLanguage ( String AcceptLanguage ) : HTTPRequestBuilder
AcceptLanguage String AcceptLanguage.
return HTTPRequestBuilder

SetAcceptRanges() public method

Set the HTTP Accept-Language header field.
public SetAcceptRanges ( String AcceptRanges ) : HTTPRequestBuilder
AcceptRanges String AcceptRanges.
return HTTPRequestBuilder

SetAuthorization() public method

Set the HTTP Authorization header field.
public SetAuthorization ( HTTPBasicAuthentication Authorization ) : HTTPRequestBuilder
Authorization HTTPBasicAuthentication Authorization.
return HTTPRequestBuilder

SetCacheControl() public method

Set the HTTP CacheControl header field.
public SetCacheControl ( String CacheControl ) : HTTPRequestBuilder
CacheControl String CacheControl.
return HTTPRequestBuilder

SetConnection() public method

Set the HTTP connection header field.
public SetConnection ( String Connection ) : HTTPRequestBuilder
Connection String A connection.
return HTTPRequestBuilder

SetContent() public method

The HTTP content/body.
public SetContent ( Byte ByteArray ) : HTTPRequestBuilder
ByteArray Byte The HTTP content/body.
return HTTPRequestBuilder

SetContent() public method

The HTTP content/body as a stream.
public SetContent ( Stream ContentStream ) : HTTPRequestBuilder
ContentStream Stream
return HTTPRequestBuilder

SetContent() public method

The HTTP content/body.
public SetContent ( String String ) : HTTPRequestBuilder
String String The HTTP content/body.
return HTTPRequestBuilder

SetContentEncoding() public method

Set the HTTP Content-Encoding header field.
public SetContentEncoding ( Encoding ContentEncoding ) : HTTPRequestBuilder
ContentEncoding System.Text.Encoding The encoding of the HTTP content/body.
return HTTPRequestBuilder

SetContentLanguage() public method

Set the HTTP Content-Languages header field.
public SetContentLanguage ( List ContentLanguages ) : HTTPRequestBuilder
ContentLanguages List The languages of the HTTP content/body.
return HTTPRequestBuilder

SetContentLength() public method

Set the HTTP Content-Length.
public SetContentLength ( System.UInt64 ContentLength ) : HTTPRequestBuilder
ContentLength System.UInt64 The length of the HTTP content/body.
return HTTPRequestBuilder

SetContentLocation() public method

Set the HTTP ContentLocation header field.
public SetContentLocation ( String ContentLocation ) : HTTPRequestBuilder
ContentLocation String ContentLocation.
return HTTPRequestBuilder

SetContentMD5() public method

Set the HTTP ContentMD5 header field.
public SetContentMD5 ( String ContentMD5 ) : HTTPRequestBuilder
ContentMD5 String ContentMD5.
return HTTPRequestBuilder

SetContentRange() public method

Set the HTTP ContentRange header field.
public SetContentRange ( String ContentRange ) : HTTPRequestBuilder
ContentRange String ContentRange.
return HTTPRequestBuilder

SetContentType() public method

Set the HTTP Content-Type header field.
public SetContentType ( HTTPContentType ContentType ) : HTTPRequestBuilder
ContentType HTTPContentType The type of the HTTP content/body.
return HTTPRequestBuilder

SetCookie() public method

Set the HTTP Cookie header field.
public SetCookie ( String Cookie ) : HTTPRequestBuilder
Cookie String Cookie.
return HTTPRequestBuilder

SetDate() public method

Set the HTTP Date header field.
public SetDate ( System.DateTime Date ) : HTTPRequestBuilder
Date System.DateTime DateTime.
return HTTPRequestBuilder

SetDepth() public method

Set the HTTP Depth header field.
public SetDepth ( String Depth ) : HTTPRequestBuilder
Depth String Depth.
return HTTPRequestBuilder

SetExpect() public method

Set the HTTP Expect header field.
public SetExpect ( String Expect ) : HTTPRequestBuilder
Expect String Expect.
return HTTPRequestBuilder

SetFrom() public method

Set the HTTP From header field.
public SetFrom ( String From ) : HTTPRequestBuilder
From String From.
return HTTPRequestBuilder

SetHTTPMethod() public method

Set the HTTP method.
public SetHTTPMethod ( HTTPMethod HTTPMethod ) : HTTPRequestBuilder
HTTPMethod HTTPMethod The HTTPMethod.
return HTTPRequestBuilder

SetHTTPStatusCode() public method

Set the HTTP status code.
public SetHTTPStatusCode ( HTTPStatusCode HTTPStatusCode ) : HTTPRequestBuilder
HTTPStatusCode HTTPStatusCode A HTTP status code.
return HTTPRequestBuilder

SetHost() public method

Set the HTTP Host header field.
public SetHost ( String Host ) : HTTPRequestBuilder
Host String Host.
return HTTPRequestBuilder

SetIf() public method

Set the HTTP If header field.
public SetIf ( String If ) : HTTPRequestBuilder
If String If.
return HTTPRequestBuilder

SetIfMatch() public method

Set the HTTP If-Match header field.
public SetIfMatch ( String IfMatch ) : HTTPRequestBuilder
IfMatch String IfMatch.
return HTTPRequestBuilder

SetIfModifiedSince() public method

Set the HTTP If-Modified-Since header field.
public SetIfModifiedSince ( String IfModifiedSince ) : HTTPRequestBuilder
IfModifiedSince String IfModifiedSince.
return HTTPRequestBuilder

SetIfNoneMatch() public method

Set the HTTP If-None-Match header field.
public SetIfNoneMatch ( String IfNoneMatch ) : HTTPRequestBuilder
IfNoneMatch String IfNoneMatch.
return HTTPRequestBuilder

SetIfRange() public method

Set the HTTP If-Range header field.
public SetIfRange ( String IfRange ) : HTTPRequestBuilder
IfRange String IfRange.
return HTTPRequestBuilder

SetIfUnmodifiedSince() public method

Set the HTTP If-Unmodified-Since header field.
public SetIfUnmodifiedSince ( String IfUnmodifiedSince ) : HTTPRequestBuilder
IfUnmodifiedSince String IfUnmodifiedSince.
return HTTPRequestBuilder

SetLastEventId() public method

Set the HTTP Last-Event-Id header field.
public SetLastEventId ( System.UInt64 LastEventId ) : HTTPRequestBuilder
LastEventId System.UInt64 LastEventId.
return HTTPRequestBuilder

SetLockToken() public method

Set the HTTP LockToken header field.
public SetLockToken ( String LockToken ) : HTTPRequestBuilder
LockToken String LockToken.
return HTTPRequestBuilder

SetMaxForwards() public method

Set the HTTP Max-Forwards header field.
public SetMaxForwards ( System.UInt64 MaxForwards ) : HTTPRequestBuilder
MaxForwards System.UInt64 MaxForwards.
return HTTPRequestBuilder

SetOverwrite() public method

Set the HTTP Overwrite header field.
public SetOverwrite ( String Overwrite ) : HTTPRequestBuilder
Overwrite String Overwrite.
return HTTPRequestBuilder

SetProtocolName() public method

Set the protocol name.
public SetProtocolName ( String ProtocolName ) : HTTPRequestBuilder
ProtocolName String The protocol name.
return HTTPRequestBuilder

SetProtocolVersion() public method

Set the protocol version.
public SetProtocolVersion ( HTTPVersion ProtocolVersion ) : HTTPRequestBuilder
ProtocolVersion HTTPVersion The protocol version.
return HTTPRequestBuilder

SetProxyAuthorization() public method

Set the HTTP Proxy-Authorization header field.
public SetProxyAuthorization ( String ProxyAuthorization ) : HTTPRequestBuilder
ProxyAuthorization String ProxyAuthorization.
return HTTPRequestBuilder

SetRange() public method

Set the HTTP Range header field.
public SetRange ( String Range ) : HTTPRequestBuilder
Range String Range.
return HTTPRequestBuilder

SetReferer() public method

Set the HTTP Referer header field.
public SetReferer ( String Referer ) : HTTPRequestBuilder
Referer String Referer.
return HTTPRequestBuilder

SetTE() public method

Set the HTTP TE header field.
public SetTE ( String TE ) : HTTPRequestBuilder
TE String TE.
return HTTPRequestBuilder

SetTimeout() public method

Set the HTTP Timeout header field.
public SetTimeout ( System.UInt64 Timeout ) : HTTPRequestBuilder
Timeout System.UInt64 Timeout.
return HTTPRequestBuilder

SetURI() public method

Set the HTTP method.
public SetURI ( String URI ) : HTTPRequestBuilder
URI String The new URI.
return HTTPRequestBuilder

SetUserAgent() public method

Set the HTTP User-Agent header field.
public SetUserAgent ( String UserAgent ) : HTTPRequestBuilder
UserAgent String UserAgent.
return HTTPRequestBuilder

SetVia() public method

Set the HTTP Via header field.
public SetVia ( String Via ) : HTTPRequestBuilder
Via String Via.
return HTTPRequestBuilder