---
title: "Class HttpContentExtensions"
slug: "web-sdk--stylelabs.m.sdk.webclient.http.httpcontentextensions"
abstract: ""
---
# Class HttpContentExtensions

Extension methods for the class.

## Inheritance

object

HttpContentExtensions

## Namespace: StylelabsStylelabs.MSdkWebClientHttp

## Assembly: Stylelabs.M.Sdk.WebClient.dll

## Syntax

```csharp
public static class HttpContentExtensions
```

## Methods

### ReadAsJsonAsync(HttpContent)

Reads the content as a .

#### Declaration

```csharp
public static Task<JToken> ReadAsJsonAsync(this HttpContent content)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| HttpContent | content | The . |

#### Returns

| Type | Description |
| --- | --- |
| Task<>JToken | An . |

### ReadAsJsonAsync<T>(HttpContent)

Parses the content as json and deserializes it to `T`.

#### Declaration

```csharp
public static Task<T> ReadAsJsonAsync<T>(this HttpContent content)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| HttpContent | content | The . |

#### Returns

| Type | Description |
| --- | --- |
| Task<> | The response as json. |

#### Type Parameters

| Name | Description |
| --- | --- |
| T | Type to deserialize to. |
