Class HttpRequestMessageEventArgs
- Namespace
- Kampute.HttpClient
- Assembly
- Kampute.HttpClient.dll
Provides event data for events that involve manipulation or inspection of HTTP request messages.
public class HttpRequestMessageEventArgs : EventArgs
- Inheritance
-
HttpRequestMessageEventArgs
- Inherited Members
Remarks
This class is typically used in scenarios where an HTTP request message needs to be inspected or modified before it is sent. It encapsulates an instance of HttpRequestMessage, allowing subscribers of the event to access and manipulate the request as necessary. Common use cases include adding headers, changing the request URI, or modifying the request body.
Constructors
HttpRequestMessageEventArgs(HttpRequestMessage)
Initializes a new instance of the HttpRequestMessageEventArgs class with the specified request message.
public HttpRequestMessageEventArgs(HttpRequestMessage request)
Parameters
request
HttpRequestMessageThe HTTP request message that has been created.
Exceptions
- ArgumentNullException
Thrown if the
request
is null.
Properties
Request
Gets the HTTP request message.
public HttpRequestMessage Request { get; }
Property Value
- HttpRequestMessage
The HTTP request message involved in the event.