HttpClientRequest
Overview
The HttpClientRequest class represents an HTTP request sent from the client to the server. This class is descended from the HttpOutgoingRequestResponse class and adds some client-side specific properties and methods.
The HttpClientRequest class is used internally by the IpHttpClientChannel and IpSuperHttpClientChannel Remoting SDK client channels.
Location
- Reference: RemObjects.SDK.dll
- Namespace: RemObjects.SDK.Http
- Ancestry: HttpRequestResponse | HttpOutgoingRequestResponse | HttpClientRequest
constructor
Creates a new instance of the HttpClientRequest class.
constructor
HttpClientRequest()
init()
Sub New()
constructor (HttpHeaders) protected (declared in HttpOutgoingRequestResponse)
constructor(header: HttpHeaders)
HttpClientRequest(HttpHeaders header)
init(_ header: HttpHeaders)
Sub New(header As HttpHeaders)
Parameters:
- header:
Client protected
Gets a flag indicating whether this class is used in a client application.
The value of this class is always true.
property Client: Boolean read;
Boolean Client { get; }
var Client: Boolean { get{} }
ReadOnly Property Client() As Boolean
CloneEvents (declared in HttpRequestResponse)
method CloneEvents(source: HttpRequestResponse)
void CloneEvents(HttpRequestResponse source)
func CloneEvents(_ source: HttpRequestResponse)
Sub CloneEvents(source As HttpRequestResponse)
Parameters:
- source:
CloseStream (declared in HttpOutgoingRequestResponse)
When ContentSource is set to ContentStream (and a ContentStream is assigned), this property determines if the stream should be closed automatically after sending it to the connection (true) or not (false).
property CloseStream: Boolean read write;
Boolean CloseStream { get; set; }
var CloseStream: Boolean { get{} set{} }
Property CloseStream() As Boolean
ContentBytes (declared in HttpOutgoingRequestResponse)
Assigns a byte array to send back as HTTP body to this property.
property ContentBytes: array of Byte read write;
Byte[] ContentBytes { get; set; }
var ContentBytes: Byte... { get{} set{} }
Property ContentBytes() As Byte()
ContentSource (declared in HttpOutgoingRequestResponse)
Defines which property (ContentBytes, ContentStream or ContantString) will be used to send the body of the response. Assigning any of these three properties will automatically set the ContentSource property so that the content will always be sent from the appropriate source.
property ContentSource: ContentSource read;
ContentSource ContentSource { get; }
var ContentSource: ContentSource { get{} }
ReadOnly Property ContentSource() As ContentSource
ContentStream (declared in HttpOutgoingRequestResponse)
Assigns a stream to send back as HTTP body to this property. When assigned (and ContentSource is set to ContentStream), you can use the CloseStream property to determine if the stream should be closed automatically after sending it to the connection (true) or not (false).
property ContentStream: Stream read write;
Stream ContentStream { get; set; }
var ContentStream: Stream { get{} set{} }
Property ContentStream() As Stream
ContentString (declared in HttpOutgoingRequestResponse)
Assigns a string to send back as HTTP body to this property.
property ContentString: String read write;
String ContentString { get; set; }
var ContentString: String { get{} set{} }
Property ContentString() As String
Encoding (declared in HttpRequestResponse)
property Encoding: Encoding read write;
Encoding Encoding { get; set; }
var Encoding: Encoding { get{} set{} }
Property Encoding() As Encoding
FinalizeHeader
Sets the HTTP headers of the request.
method FinalizeHeader
void FinalizeHeader()
func FinalizeHeader()
Sub FinalizeHeader()
HandleOnBytesSent protected (declared in HttpOutgoingRequestResponse)
method HandleOnBytesSent(sender: Object; e: EventArgs)
void HandleOnBytesSent(Object sender, EventArgs e)
func HandleOnBytesSent(_ sender: Object, _ e: EventArgs)
Sub HandleOnBytesSent(sender As Object, e As EventArgs)
Parameters:
- sender:
- e:
HasOnTransferProgress protected (declared in HttpRequestResponse)
property HasOnTransferProgress: Boolean read;
Boolean HasOnTransferProgress { get; }
var HasOnTransferProgress: Boolean { get{} }
ReadOnly Property HasOnTransferProgress() As Boolean
Header (declared in HttpRequestResponse)
property Header: HttpHeaders read write;
HttpHeaders Header { get; set; }
var Header: HttpHeaders { get{} set{} }
Property Header() As HttpHeaders
KeepAlive (declared in HttpOutgoingRequestResponse)
property KeepAlive: Boolean read write;
Boolean KeepAlive { get; set; }
var KeepAlive: Boolean { get{} set{} }
Property KeepAlive() As Boolean
OnTransferEnd (declared in HttpRequestResponse)
event OnTransferEnd: EventHandler<TransferEndEventArgs>
delegate EventHandler<TransferEndEventArgs> OnTransferEnd()
__event EventHandler<TransferEndEventArgs>: OnTransferEnd!
Event OnTransferEnd As EventHandler<TransferEndEventArgs>
OnTransferProgress (declared in HttpRequestResponse)
event OnTransferProgress: EventHandler<TransferProgressEventArgs>
delegate EventHandler<TransferProgressEventArgs> OnTransferProgress()
__event EventHandler<TransferProgressEventArgs>: OnTransferProgress!
Event OnTransferProgress As EventHandler<TransferProgressEventArgs>
OnTransferStart (declared in HttpRequestResponse)
event OnTransferStart: EventHandler<TransferStartEventArgs>
delegate EventHandler<TransferStartEventArgs> OnTransferStart()
__event EventHandler<TransferStartEventArgs>: OnTransferStart!
Event OnTransferStart As EventHandler<TransferStartEventArgs>
RequestType
Gets or sets the type of the HTTP request.
Possible values are:
- RequestType.Get
- RequestType.Post
- RequestType.Put
- RequestType.Delete
- RequestType.Head
The default value of this class is RequestType.Get.
property RequestType: RequestType read write;
RequestType RequestType { get; set; }
var RequestType: RequestType { get{} set{} }
Property RequestType() As RequestType
Server protected
Gets a flag indicating whether this class is used in a server application.
The value of this class is always false.
property Server: Boolean read;
Boolean Server { get; }
var Server: Boolean { get{} }
ReadOnly Property Server() As Boolean
TriggerOnTransferEnd protected (declared in HttpRequestResponse)
method TriggerOnTransferEnd(direction: TransferDirection)
void TriggerOnTransferEnd(TransferDirection direction)
func TriggerOnTransferEnd(_ direction: TransferDirection)
Sub TriggerOnTransferEnd(direction As TransferDirection)
Parameters:
- direction:
TriggerOnTransferProgress protected (declared in HttpRequestResponse)
method TriggerOnTransferProgress(direction: TransferDirection; position: Int64)
void TriggerOnTransferProgress(TransferDirection direction, Int64 position)
func TriggerOnTransferProgress(_ direction: TransferDirection, _ position: Int64)
Sub TriggerOnTransferProgress(direction As TransferDirection, position As Int64)
Parameters:
- direction:
- position:
TriggerOnTransferStart protected (declared in HttpRequestResponse)
method TriggerOnTransferStart(direction: TransferDirection; size: Int64)
void TriggerOnTransferStart(TransferDirection direction, Int64 size)
func TriggerOnTransferStart(_ direction: TransferDirection, _ size: Int64)
Sub TriggerOnTransferStart(direction As TransferDirection, size As Int64)
Parameters:
- direction:
- size:
Url
Gets or sets the target URL for the HTTP request.
property Url: UrlParser read write;
UrlParser Url { get; set; }
var Url: UrlParser { get{} set{} }
Property Url() As UrlParser
UseProxy
property UseProxy: Boolean read write;
Boolean UseProxy { get; set; }
var UseProxy: Boolean { get{} set{} }
Property UseProxy() As Boolean
WriteBodyToConnection (declared in HttpOutgoingRequestResponse)
method WriteBodyToConnection(connection: Connection)
void WriteBodyToConnection(Connection connection)
func WriteBodyToConnection(_ connection: Connection)
Sub WriteBodyToConnection(connection As Connection)
Parameters:
- connection:
WriteHeaderToConnection (declared in HttpOutgoingRequestResponse)
method WriteHeaderToConnection(connection: Connection)
void WriteHeaderToConnection(Connection connection)
func WriteHeaderToConnection(_ connection: Connection)
Sub WriteHeaderToConnection(connection As Connection)
Parameters:
- connection:
WriteToConnection (declared in HttpOutgoingRequestResponse)
method WriteToConnection(connection: Connection)
void WriteToConnection(Connection connection)
func WriteToConnection(_ connection: Connection)
Sub WriteToConnection(connection As Connection)
Parameters:
- connection:
Client protected
Gets a flag indicating whether this class is used in a client application.
The value of this class is always true.
property Client: Boolean read;
Boolean Client { get; }
var Client: Boolean { get{} }
ReadOnly Property Client() As Boolean
CloseStream (declared in HttpOutgoingRequestResponse)
When ContentSource is set to ContentStream (and a ContentStream is assigned), this property determines if the stream should be closed automatically after sending it to the connection (true) or not (false).
property CloseStream: Boolean read write;
Boolean CloseStream { get; set; }
var CloseStream: Boolean { get{} set{} }
Property CloseStream() As Boolean
ContentBytes (declared in HttpOutgoingRequestResponse)
Assigns a byte array to send back as HTTP body to this property.
property ContentBytes: array of Byte read write;
Byte[] ContentBytes { get; set; }
var ContentBytes: Byte... { get{} set{} }
Property ContentBytes() As Byte()
ContentSource (declared in HttpOutgoingRequestResponse)
Defines which property (ContentBytes, ContentStream or ContantString) will be used to send the body of the response. Assigning any of these three properties will automatically set the ContentSource property so that the content will always be sent from the appropriate source.
property ContentSource: ContentSource read;
ContentSource ContentSource { get; }
var ContentSource: ContentSource { get{} }
ReadOnly Property ContentSource() As ContentSource
ContentStream (declared in HttpOutgoingRequestResponse)
Assigns a stream to send back as HTTP body to this property. When assigned (and ContentSource is set to ContentStream), you can use the CloseStream property to determine if the stream should be closed automatically after sending it to the connection (true) or not (false).
property ContentStream: Stream read write;
Stream ContentStream { get; set; }
var ContentStream: Stream { get{} set{} }
Property ContentStream() As Stream
ContentString (declared in HttpOutgoingRequestResponse)
Assigns a string to send back as HTTP body to this property.
property ContentString: String read write;
String ContentString { get; set; }
var ContentString: String { get{} set{} }
Property ContentString() As String
Encoding (declared in HttpRequestResponse)
property Encoding: Encoding read write;
Encoding Encoding { get; set; }
var Encoding: Encoding { get{} set{} }
Property Encoding() As Encoding
HasOnTransferProgress protected (declared in HttpRequestResponse)
property HasOnTransferProgress: Boolean read;
Boolean HasOnTransferProgress { get; }
var HasOnTransferProgress: Boolean { get{} }
ReadOnly Property HasOnTransferProgress() As Boolean
Header (declared in HttpRequestResponse)
property Header: HttpHeaders read write;
HttpHeaders Header { get; set; }
var Header: HttpHeaders { get{} set{} }
Property Header() As HttpHeaders
KeepAlive (declared in HttpOutgoingRequestResponse)
property KeepAlive: Boolean read write;
Boolean KeepAlive { get; set; }
var KeepAlive: Boolean { get{} set{} }
Property KeepAlive() As Boolean
RequestType
Gets or sets the type of the HTTP request.
Possible values are:
- RequestType.Get
- RequestType.Post
- RequestType.Put
- RequestType.Delete
- RequestType.Head
The default value of this class is RequestType.Get.
property RequestType: RequestType read write;
RequestType RequestType { get; set; }
var RequestType: RequestType { get{} set{} }
Property RequestType() As RequestType
Server protected
Gets a flag indicating whether this class is used in a server application.
The value of this class is always false.
property Server: Boolean read;
Boolean Server { get; }
var Server: Boolean { get{} }
ReadOnly Property Server() As Boolean
Url
Gets or sets the target URL for the HTTP request.
property Url: UrlParser read write;
UrlParser Url { get; set; }
var Url: UrlParser { get{} set{} }
Property Url() As UrlParser
UseProxy
property UseProxy: Boolean read write;
Boolean UseProxy { get; set; }
var UseProxy: Boolean { get{} set{} }
Property UseProxy() As Boolean
constructor
Creates a new instance of the HttpClientRequest class.
constructor
HttpClientRequest()
init()
Sub New()
constructor (HttpHeaders) protected (declared in HttpOutgoingRequestResponse)
constructor(header: HttpHeaders)
HttpClientRequest(HttpHeaders header)
init(_ header: HttpHeaders)
Sub New(header As HttpHeaders)
Parameters:
- header:
CloneEvents (declared in HttpRequestResponse)
method CloneEvents(source: HttpRequestResponse)
void CloneEvents(HttpRequestResponse source)
func CloneEvents(_ source: HttpRequestResponse)
Sub CloneEvents(source As HttpRequestResponse)
Parameters:
- source:
FinalizeHeader
Sets the HTTP headers of the request.
method FinalizeHeader
void FinalizeHeader()
func FinalizeHeader()
Sub FinalizeHeader()
HandleOnBytesSent protected (declared in HttpOutgoingRequestResponse)
method HandleOnBytesSent(sender: Object; e: EventArgs)
void HandleOnBytesSent(Object sender, EventArgs e)
func HandleOnBytesSent(_ sender: Object, _ e: EventArgs)
Sub HandleOnBytesSent(sender As Object, e As EventArgs)
Parameters:
- sender:
- e:
TriggerOnTransferEnd protected (declared in HttpRequestResponse)
method TriggerOnTransferEnd(direction: TransferDirection)
void TriggerOnTransferEnd(TransferDirection direction)
func TriggerOnTransferEnd(_ direction: TransferDirection)
Sub TriggerOnTransferEnd(direction As TransferDirection)
Parameters:
- direction:
TriggerOnTransferProgress protected (declared in HttpRequestResponse)
method TriggerOnTransferProgress(direction: TransferDirection; position: Int64)
void TriggerOnTransferProgress(TransferDirection direction, Int64 position)
func TriggerOnTransferProgress(_ direction: TransferDirection, _ position: Int64)
Sub TriggerOnTransferProgress(direction As TransferDirection, position As Int64)
Parameters:
- direction:
- position:
TriggerOnTransferStart protected (declared in HttpRequestResponse)
method TriggerOnTransferStart(direction: TransferDirection; size: Int64)
void TriggerOnTransferStart(TransferDirection direction, Int64 size)
func TriggerOnTransferStart(_ direction: TransferDirection, _ size: Int64)
Sub TriggerOnTransferStart(direction As TransferDirection, size As Int64)
Parameters:
- direction:
- size:
WriteBodyToConnection (declared in HttpOutgoingRequestResponse)
method WriteBodyToConnection(connection: Connection)
void WriteBodyToConnection(Connection connection)
func WriteBodyToConnection(_ connection: Connection)
Sub WriteBodyToConnection(connection As Connection)
Parameters:
- connection:
WriteHeaderToConnection (declared in HttpOutgoingRequestResponse)
method WriteHeaderToConnection(connection: Connection)
void WriteHeaderToConnection(Connection connection)
func WriteHeaderToConnection(_ connection: Connection)
Sub WriteHeaderToConnection(connection As Connection)
Parameters:
- connection:
WriteToConnection (declared in HttpOutgoingRequestResponse)
method WriteToConnection(connection: Connection)
void WriteToConnection(Connection connection)
func WriteToConnection(_ connection: Connection)
Sub WriteToConnection(connection As Connection)
Parameters:
- connection:
OnTransferEnd (declared in HttpRequestResponse)
event OnTransferEnd: EventHandler<TransferEndEventArgs>
delegate EventHandler<TransferEndEventArgs> OnTransferEnd()
__event EventHandler<TransferEndEventArgs>: OnTransferEnd!
Event OnTransferEnd As EventHandler<TransferEndEventArgs>
OnTransferProgress (declared in HttpRequestResponse)
event OnTransferProgress: EventHandler<TransferProgressEventArgs>
delegate EventHandler<TransferProgressEventArgs> OnTransferProgress()
__event EventHandler<TransferProgressEventArgs>: OnTransferProgress!
Event OnTransferProgress As EventHandler<TransferProgressEventArgs>
OnTransferStart (declared in HttpRequestResponse)
event OnTransferStart: EventHandler<TransferStartEventArgs>
delegate EventHandler<TransferStartEventArgs> OnTransferStart()
__event EventHandler<TransferStartEventArgs>: OnTransferStart!
Event OnTransferStart As EventHandler<TransferStartEventArgs>