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

## ISecureHttpFetcher Interface

Defines a contract for securely fetching content from external URIs with SSRF protection\.

```csharp
public interface ISecureHttpFetcher
```

Derived  
↳ [CachingSecureHttpFetcherDecorator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.SecureHttpFetch.CachingSecureHttpFetcherDecorator 'Abblix\.Oidc\.Server\.Features\.SecureHttpFetch\.CachingSecureHttpFetcherDecorator')  
↳ [SecureHttpFetcher](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.SecureHttpFetch.SecureHttpFetcher 'Abblix\.Oidc\.Server\.Features\.SecureHttpFetch\.SecureHttpFetcher')
### Methods

## ISecureHttpFetcher\.FetchAsync\<T\>\(Uri\) Method {#Abblix.Oidc.Server.Features.SecureHttpFetch.ISecureHttpFetcher.FetchAsync_T_(System.Uri)}

Fetches content from a URI with SSRF protection\.
For JSON content, deserializes to the specified type\.
For raw content like JWT strings, use string as the type parameter\.

```csharp
System.Threading.Tasks.Task<Abblix.Utils.Result<T,Abblix.Oidc.Server.Common.OidcError>> FetchAsync<T>(System.Uri uri);
```
#### Type parameters

###### `T` {#Abblix.Oidc.Server.Features.SecureHttpFetch.ISecureHttpFetcher.FetchAsync_T_(System.Uri).T}

The type to deserialize the response to\. Use string for raw text content\.
#### Parameters

###### `uri` [System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri') {#Abblix.Oidc.Server.Features.SecureHttpFetch.ISecureHttpFetcher.FetchAsync_T_(System.Uri).uri}

The URI to fetch content from\.

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[Abblix\.Utils\.Result&lt;](https://learn.microsoft.com/en-us/dotnet/api/abblix.utils.result-2 'Abblix\.Utils\.Result\`2')[T](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.SecureHttpFetch.ISecureHttpFetcher#Abblix.Oidc.Server.Features.SecureHttpFetch.ISecureHttpFetcher.FetchAsync_T_(System.Uri).T 'Abblix\.Oidc\.Server\.Features\.SecureHttpFetch\.ISecureHttpFetcher\.FetchAsync\<T\>\(System\.Uri\)\.T')[,](https://learn.microsoft.com/en-us/dotnet/api/abblix.utils.result-2 'Abblix\.Utils\.Result\`2')[OidcError](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.OidcError 'Abblix\.Oidc\.Server\.Common\.OidcError')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/abblix.utils.result-2 'Abblix\.Utils\.Result\`2')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
A Result containing either the deserialized content or an OidcError if the fetch operation fails\.
