Interface IHttpRequest
Defines the contract for an HTTP request.
public interface IHttpRequest
Properties
Body
Gets the request body stream.
Stream Body { get; }
Property Value
ContentLength
Gets the content length of the request body in bytes.
long ContentLength { get; }
Property Value
Headers
Gets the collection of HTTP headers sent with the request.
NameValueCollection Headers { get; }
Property Value
HttpMethod
Gets the HTTP method (GET, POST, etc.) of the request.
string HttpMethod { get; }
Property Value
PathBase
Gets the base path of the request URL.
string PathBase { get; }
Property Value
RemoteEndPoint
Gets the remote endpoint of the client making the request.
IPEndPoint RemoteEndPoint { get; }
Property Value
Url
Gets the full URL of the request.
Uri Url { get; }
Property Value
- Uri
Methods
GetHeader(string)
Gets the value of the specified HTTP header.
string GetHeader(string headerName)
Parameters
headerNamestringThe name of the header to retrieve.
Returns
- string
The value of the header, or null if not found.