Table of Contents

Class SendingRemoteHttpRequestEventArgs

Namespace
OpenQA.Selenium.Remote
Assembly
WebDriver.dll

Provides data for the SendingRemoteHttpRequest event of a HttpCommandExecutor object.

public class SendingRemoteHttpRequestEventArgs : EventArgs
Inheritance
SendingRemoteHttpRequestEventArgs
Inherited Members

Constructors

SendingRemoteHttpRequestEventArgs(string, string, string)

Initializes a new instance of the SendingRemoteHttpRequestEventArgs class.

public SendingRemoteHttpRequestEventArgs(string method, string fullUrl, string requestBody)

Parameters

method string

The HTTP method of the request being sent.

fullUrl string

The full URL of the request being sent.

requestBody string

The body of the request.

Properties

FullUrl

Gets the full URL of the HTTP request.

public string FullUrl { get; }

Property Value

string

Headers

Gets a read-only dictionary of the headers of the HTTP request. Does not include default headers of the web client making the request.

public IReadOnlyDictionary<string, string> Headers { get; }

Property Value

IReadOnlyDictionary<string, string>

Method

Gets the HTTP method for the HTTP request.

public string Method { get; }

Property Value

string

RequestBody

Gets the body of the HTTP request as a string.

public string RequestBody { get; }

Property Value

string

Methods

AddHeader(string, string)

Adds a header to the HTTP request.

public void AddHeader(string headerName, string headerValue)

Parameters

headerName string

The name of the header to add.

headerValue string

The value of the header to add.

Remarks

Adding headers here will attempt to add them to the headers for the HTTP request being sent; however, be aware they may be overwritten by the client raising the event.