Class HttpEndPoint
Represents HTTP endpoint.
Implements
Inherited Members
Namespace: DotNext.Net.Http
Assembly: DotNext.dll
Syntax
public sealed class HttpEndPoint : DnsEndPoint, ISupplier<UriBuilder>, IFunctional<Func<UriBuilder>>, IEquatable<HttpEndPoint>, IEqualityOperators<HttpEndPoint?, HttpEndPoint?, bool>
Constructors
| Edit this page View SourceHttpEndPoint(IPAddress, int, bool)
Initializes a new HTTP endpoint.
Declaration
public HttpEndPoint(IPAddress address, int port, bool secure)
Parameters
Type | Name | Description |
---|---|---|
IPAddress | address | The address of the endpoint. |
int | port | The port number associated with the address, or 0 to specify any available port. |
bool | secure |
HttpEndPoint(IPEndPoint, bool)
Initializes a new HTTP endpoint.
Declaration
public HttpEndPoint(IPEndPoint address, bool secure)
Parameters
Type | Name | Description |
---|---|---|
IPEndPoint | address | The address of the endpoint. |
bool | secure |
HttpEndPoint(string, int, bool, AddressFamily)
Initializes a new HTTP endpoint.
Declaration
public HttpEndPoint(string hostName, int port, bool secure, AddressFamily family = AddressFamily.Unspecified)
Parameters
Type | Name | Description |
---|---|---|
string | hostName | The host name or a string representation of the IP address. |
int | port | The port number associated with the address, or 0 to specify any available port. |
bool | secure | |
AddressFamily | family | The type of the host name. |
HttpEndPoint(Uri)
Initializes a new HTTP endpoint.
Declaration
public HttpEndPoint(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | The absolute path to Web resource. |
Properties
| Edit this page View SourceIsSecure
Gets a value indicating that HTTP over TLS should be used (HTTPS).
Declaration
public bool IsSecure { get; }
Property Value
Type | Description |
---|---|
bool |
Scheme
Gets URI scheme.
Declaration
public string Scheme { get; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceCreateUriBuilder()
Creates a new instance of UriBuilder with host, port and scheme imported from this object.
Declaration
public UriBuilder CreateUriBuilder()
Returns
Type | Description |
---|---|
UriBuilder | A new instance of UriBuilder. |
Equals(HttpEndPoint?)
Determines whether this object represents the same HTTP endpoint as the specified object.
Declaration
public bool Equals(HttpEndPoint? other)
Parameters
Type | Name | Description |
---|---|---|
HttpEndPoint | other | The object to compare. |
Returns
Type | Description |
---|---|
bool | true if this object represents the same endpoint as |
Equals(object?)
Determines whether this object represents the same HTTP endpoint as the specified object.
Declaration
public override bool Equals(object? other)
Parameters
Type | Name | Description |
---|---|---|
object | other | The object to compare. |
Returns
Type | Description |
---|---|
bool | true if this object represents the same endpoint as |
Overrides
| Edit this page View SourceGetHashCode()
Gets a hash code of this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | The hash code of this instance. |
Overrides
| Edit this page View SourceToString()
Converts endpoint to its string representation.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The string representation of this end point. |
Overrides
| Edit this page View SourceTryParse(string?, out HttpEndPoint?)
Attempts to parse HTTP endpoint.
Declaration
public static bool TryParse(string? str, out HttpEndPoint? result)
Parameters
Type | Name | Description |
---|---|---|
string | str | The string representing HTTP endpoint. |
HttpEndPoint | result | The parsed object; or null if parsing failed. |
Returns
Type | Description |
---|---|
bool |
Operators
| Edit this page View Sourceoperator ==(HttpEndPoint?, HttpEndPoint?)
Determines whether the objects represent the same HTTP endpoint.
Declaration
public static bool operator ==(HttpEndPoint? x, HttpEndPoint? y)
Parameters
Type | Name | Description |
---|---|---|
HttpEndPoint | x | The first object to compare. |
HttpEndPoint | y | The second object to compare. |
Returns
Type | Description |
---|---|
bool | true if both objects represent the same endpoint; otherwise, false. |
explicit operator UriBuilder?(HttpEndPoint?)
Creates a new instance of UriBuilder with host, port and scheme imported from this object.
Declaration
public static explicit operator UriBuilder?(HttpEndPoint? endPoint)
Parameters
Type | Name | Description |
---|---|---|
HttpEndPoint | endPoint | The endpoint. |
Returns
Type | Description |
---|---|
UriBuilder | A new instance of UriBuilder. |
operator !=(HttpEndPoint?, HttpEndPoint?)
Determines whether the objects represent the different HTTP endpoints.
Declaration
public static bool operator !=(HttpEndPoint? x, HttpEndPoint? y)
Parameters
Type | Name | Description |
---|---|---|
HttpEndPoint | x | The first object to compare. |
HttpEndPoint | y | The second object to compare. |
Returns
Type | Description |
---|---|
bool | true if both objects represent the different endpoints; otherwise, false. |