Class HttpResponseMessageEventArgs
- Namespace
- Kampute.HttpClient
- Assembly
- Kampute.HttpClient.dll
Provides event data for events related to the receipt of HTTP responses.
public class HttpResponseMessageEventArgs : EventArgs
- Inheritance
-
HttpResponseMessageEventArgs
- Inherited Members
Remarks
This class is typically used in scenarios where an application needs to process or inspect HTTP responses in a centralized manner. It encapsulates an instance of HttpResponseMessage, allowing event handlers to access and potentially modify the response message. This capability is particularly useful in middle-ware, HTTP client wrappers, or other scenarios where responses need to be logged, modified, or inspected for specific criteria (like status codes or headers) before being processed further.
Constructors
HttpResponseMessageEventArgs(HttpResponseMessage)
Initializes a new instance of the HttpResponseMessageEventArgs class with the specified response message.
public HttpResponseMessageEventArgs(HttpResponseMessage response)
Parameters
response
HttpResponseMessageThe received HTTP response message.
Exceptions
- ArgumentNullException
Thrown if the
response
is null.
Properties
Response
Gets the HTTP response message.
public HttpResponseMessage Response { get; }
Property Value
- HttpResponseMessage
The HTTP response message involved in the event.