Show / Hide Table of Contents

Class HttpEndPoint

Represents HTTP endpoint.

Inheritance
object
EndPoint
DnsEndPoint
HttpEndPoint
Implements
ISupplier<UriBuilder>
IFunctional<Func<UriBuilder>>
IEquatable<HttpEndPoint>
IEqualityOperators<HttpEndPoint, HttpEndPoint, bool>
ISpanFormattable
IFormattable
IParsable<HttpEndPoint>
IUtf8SpanFormattable
Inherited Members
DnsEndPoint.AddressFamily
DnsEndPoint.Host
DnsEndPoint.Port
EndPoint.Create(SocketAddress)
EndPoint.Serialize()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: DotNext.Net.Http
Assembly: DotNext.dll
Syntax
public sealed class HttpEndPoint : DnsEndPoint, ISupplier<UriBuilder>, IFunctional<Func<UriBuilder>>, IEquatable<HttpEndPoint>, IEqualityOperators<HttpEndPoint?, HttpEndPoint?, bool>, ISpanFormattable, IFormattable, IParsable<HttpEndPoint>, IUtf8SpanFormattable

Constructors

| Edit this page View Source

HttpEndPoint(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

true for HTTPS; false for HTTP.

| Edit this page View Source

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

true for HTTPS; false for HTTP.

| Edit this page View Source

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

true for HTTPS; false for HTTP.

AddressFamily family

The type of the host name.

| Edit this page View Source

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 Source

IsSecure

Gets a value indicating that HTTP over TLS should be used (HTTPS).

Declaration
public bool IsSecure { get; }
Property Value
Type Description
bool
| Edit this page View Source

Scheme

Gets URI scheme.

Declaration
public string Scheme { get; }
Property Value
Type Description
string

Methods

| Edit this page View Source

CreateUriBuilder()

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.

| Edit this page View Source

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 other; otherwise, false.

| Edit this page View Source

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 other; otherwise, false.

Overrides
DnsEndPoint.Equals(object)
| Edit this page View Source

GetHashCode()

Gets a hash code of this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
int

The hash code of this instance.

Overrides
DnsEndPoint.GetHashCode()
| Edit this page View Source

ToString()

Converts endpoint to its string representation.

Declaration
public override string ToString()
Returns
Type Description
string

The string representation of this end point.

Overrides
DnsEndPoint.ToString()
| Edit this page View Source

ToString(string?, IFormatProvider?)

Formats the value of the current instance using the specified format.

Declaration
public string ToString(string? format, IFormatProvider? formatProvider)
Parameters
Type Name Description
string format

The format to use.

-or-

A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.

IFormatProvider formatProvider

The provider to use to format the value.

-or-

A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

Returns
Type Description
string

The value of the current instance in the specified format.

| Edit this page View Source

TryParse(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

true if parsing is successful; otherwise, false.

Operators

| Edit this page View Source

operator ==(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.

| Edit this page View Source

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.

| Edit this page View Source

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.

Implements

ISupplier<TResult>
IFunctional<TDelegate>
IEquatable<T>
IEqualityOperators<TSelf, TOther, TResult>
ISpanFormattable
IFormattable
IParsable<TSelf>
IUtf8SpanFormattable

Extension Methods

BasicExtensions.As<T>(T)
BasicExtensions.GetUserData<T>(T)
BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, ReadOnlySpan<T>)
ExpressionBuilder.Const<T>(T)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, bool, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, bool, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan, CancellationToken)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
EndPointFormatter.GetBytes(EndPoint, MemoryAllocator<byte>?)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾