ASP.NET Core API Documentation
This section provides detailed API reference documentation for ASP.NET Core.
Namespace: Microsoft.AspNetCore.Http
Provides types for interacting with HTTP requests and responses.
Classes
-
HttpContext
- HttpRequest Request { get; } Gets the HttpRequest object.
- HttpResponse Response { get; } Gets the HttpResponse object.
- ISession Session { get; set; } Gets or sets the ISession object.
-
HttpRequest
- string Method { get; } Gets the HTTP method of the request.
- string Path { get; set; } Gets or sets the path of the request.
- IHeaderDictionary Headers { get; } Gets the collection of HTTP headers for the request.
-
HttpResponse
- int StatusCode { get; set; } Gets or sets the status code of the response.
- IHeaderDictionary Headers { get; } Gets the collection of HTTP headers for the response.
- Stream Body { get; set; } Gets the response body.
Interfaces
-
ISession
- bool IsAvailable { get; } Checks if the session is available.
- string Id { get; } Gets the session ID.
Namespace: Microsoft.AspNetCore.Mvc
Provides types for building Model-View-Controller (MVC) applications.
Classes
-
ControllerBase
- ControllerContext ControllerContext { get; } Gets or sets the controller's context.
- HttpContext HttpContext { get; } Gets the HTTP context for the current request.
-
Controller
- ViewResult View() Renders a view.
- IActionResult Ok(object value) Returns an OK (200) response.
- IActionResult NotFound() Returns a Not Found (404) response.
-
IActionResult
- Task ExecuteResultAsync(ActionContext context) Executes the result.
Namespace: Microsoft.AspNetCore.Routing
Provides types for URL routing.
Classes
-
Endpoints
- IEndpointRouteBuilder MapGet(string pattern, [DisallowAsyncSignature] Func<HttpContext, RequestDelegate> requestDelegate) Adds a route that matches GET requests.
Last updated: November 15, 2023