Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class Microsoft.​AspNetCore.​Http.​EndpointHttpContextExtensions

Assembly: Microsoft.AspNetCore.Http.Abstractions

Inheritance: object → EndpointHttpContextExtensions

Extension methods to expose Endpoint on HttpContext.

Methods

public static Endpoint
GetEndpoint​(HttpContext context)
Extension method for getting the <see cref="T:Microsoft.AspNetCore.Http.Endpoint" /> for the current request.
Returns The <see cref="T:Microsoft.AspNetCore.Http.Endpoint" /> or <c>null</c> if the request doesn't have an endpoint.
context The <see cref="T:Microsoft.AspNetCore.Http.HttpContext" /> context.
Remarks The endpoint for a request is typically set by routing middleware. A request might not have an endpoint if routing middleware hasn't run yet, or the request didn't match a route.
public static void
SetEndpoint​(HttpContext context, Endpoint? endpoint)
Extension method for setting the <see cref="T:Microsoft.AspNetCore.Http.Endpoint" /> for the current request.
context The <see cref="T:Microsoft.AspNetCore.Http.HttpContext" /> context.
endpoint The <see cref="T:Microsoft.AspNetCore.Http.Endpoint" /> . A <c>null</c> value clears the endpoint for the current request.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object