#### [Abblix\.Oidc\.Server\.Mvc](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc 'index')
### [Abblix\.Oidc\.Server\.Mvc](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc 'Abblix\.Oidc\.Server\.Mvc')

## HttpRequestExtensions Class

MVC\-only [Microsoft\.AspNetCore\.Http\.HttpRequest](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.httprequest 'Microsoft\.AspNetCore\.Http\.HttpRequest') extension that resolves an application\-relative path to an absolute URI
through the MVC [IUriResolver](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.IUriResolver 'Abblix\.Oidc\.Server\.Mvc\.IUriResolver')\. The framework\-neutral URL helpers \(`GetAppUrl`/`GetBaseUrl`\)
live in the shared `Abblix.Oidc.Server.AspNetCore` project\.

```csharp
public static class HttpRequestExtensions
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → HttpRequestExtensions
### Methods

## HttpRequestExtensions\.ToAbsoluteUri\(this HttpRequest, string\) Method {#Abblix.Oidc.Server.Mvc.HttpRequestExtensions.ToAbsoluteUri(thisMicrosoft.AspNetCore.Http.HttpRequest,string)}

Converts a relative path into an absolute URI using the application's base URL\.

```csharp
public static System.Uri ToAbsoluteUri(this Microsoft.AspNetCore.Http.HttpRequest request, string path);
```
#### Parameters

###### `request` [Microsoft\.AspNetCore\.Http\.HttpRequest](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.httprequest 'Microsoft\.AspNetCore\.Http\.HttpRequest') {#Abblix.Oidc.Server.Mvc.HttpRequestExtensions.ToAbsoluteUri(thisMicrosoft.AspNetCore.Http.HttpRequest,string).request}

The HTTP request used to access the [IUriResolver](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.IUriResolver 'Abblix\.Oidc\.Server\.Mvc\.IUriResolver') service\.

###### `path` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Mvc.HttpRequestExtensions.ToAbsoluteUri(thisMicrosoft.AspNetCore.Http.HttpRequest,string).path}

The path to resolve\. Supports:
\- Application\-relative paths starting with `"~/"` \(e\.g\., `~/dashboard`\)
\- Route template constants with default values \(e\.g\., `[route:authorize?~/connect/authorize]`\)
\- Regular relative paths

#### Returns
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')  
A fully qualified [System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri') representing the resolved absolute URL\.

### Remarks
This extension method delegates to [Content\(string\)](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.IUriResolver#Abblix.Oidc.Server.Mvc.IUriResolver.Content(string) 'Abblix\.Oidc\.Server\.Mvc\.IUriResolver\.Content\(string\)') for URI resolution\.
