---
id: object/codeunit/2354
type: object
title: Codeunit 2354 "Http Content"
summary: Codeunit 2354 "Http Content" in System Application (System.RestClient). 26 public procedures. Present since at least BC23, still in BC30, changed in BC26.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "26"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: a11b9b93f3ad6fba635fc47483be3856522514a969f68d41351fa4849fa7cbbe
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Rest%20Client/src/HttpContent.Codeunit.al
    title: src/System Application/App/Rest Client/src/HttpContent.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 2354
name: Http Content
namespace: System.RestClient
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "26"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 26
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 4
  implements: 0
---

# Codeunit 2354 "Http Content"

> Codeunit 2354 "Http Content" in System Application (System.RestClient). 26 public procedures. Present since at least BC23, still in BC30, changed in BC26.

System Application · System.RestClient · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Rest%20Client/src/HttpContent.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Procedures

- `Create(Content: Text): Codeunit "Http Content"`: Initializes a new instance of the Http Content class with the specified Text content.
- `Create(Content: SecretText): Codeunit "Http Content"`: Initializes a new instance of the Http Content class with the specified SecretText content.
- `Create(Content: Text; ContentType: Text): Codeunit "Http Content"`: Initializes a new instance of the Http Content class with the specified Text content and content type.
- `Create(Content: SecretText; ContentType: Text): Codeunit "Http Content"`: Initializes a new instance of the Http Content class with the specified SecretText content and content type.
- `Create(Content: JsonObject): Codeunit "Http Content"`: Initializes a new instance of the Http Content class with the specified JsonObject content.
- `Create(Content: JsonArray): Codeunit "Http Content"`: Initializes a new instance of the Http Content class with the specified JsonArray content.
- `Create(Content: JsonToken): Codeunit "Http Content"`: Initializes a new instance of the Http Content class with the specified JsonToken content.
- `Create(Content: XmlDocument): Codeunit "Http Content"`: Initializes a new instance of the Http Content class with the specified XmlDocument content.
- `Create(Content: Codeunit "Temp Blob"): Codeunit "Http Content"`: Initializes a new instance of the Http Content class with the specified "Temp Blob" Codeunit content.
- `Create(Content: Codeunit "Temp Blob"; ContentType: Text): Codeunit "Http Content"`: Initializes a new instance of the Http Content class with the specified "Temp Blob" Codeunit content and content type.
- `Create(Content: InStream): Codeunit "Http Content"`: Initializes a new instance of the Http Content class with the specified InStream content.
- `Create(Content: InStream; ContentType: Text): Codeunit "Http Content"`: Initializes a new instance of the Http Content class with the specified InStream content and content type.
- `Create(Content: HttpContent): Codeunit "Http Content"`: Initializes a new instance of the Http Content object with the specified HttpContent object.
- `SetContentTypeHeader(ContentType: Text)`: Sets the Content-Type header of the HttpContent object.
- `AddContentEncoding(ContentEncoding: Text)`: Sets the Content-Encoding header of the HttpContent object.
- `SetHeader(Name: Text; Value: Text)`: Sets a new value for an existing header of the HttpContent object, or adds the header if it does not already exist.
- `SetHeader(Name: Text; Value: SecretText)`: Sets a new value for an existing header of the HttpContent object, or adds the header if it does not already exist.
- `GetHttpContent(): HttpContent`: Gets the HttpContent object.
- `AsText(): Text`: Gets the content of the HTTP response message as a string.
- `AsSecretText(): SecretText`: Gets the content of the HTTP response message as a SecretText.
- `AsBlob(): Codeunit "Temp Blob"`: Gets the content of the HTTP response message as a "Temp Blob" Codeunit.
- `AsInStream(): InStream`: Gets the content of the HTTP response message as an InStream.
- `AsXmlDocument(): XmlDocument`: Gets the content of the HTTP response message as an XmlDocument.
- `AsJson(): JsonToken`: Gets the content of the HTTP response message as a JsonToken.
- `AsJsonObject(): JsonObject`: Gets the content of the HTTP response message as a JsonObject.
- `AsJsonArray(): JsonArray`: Gets the content of the HTTP response message as a JsonArray.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 2355 "Http Content Impl."](../codeunit/2355.md) (13 calls: `AddContentEncoding → AddContentEncoding`, `AsBlob → AsBlob`, `AsInStream → AsInStream`, …)

## Called by

- [Codeunit 9123 "SharePoint Graph Req. Helper"](../codeunit/9123.md) (4 calls: `CreateUploadSession → Create`, `UploadChunk → Create`, `UploadChunk → SetContentTypeHeader`, …)
- [Codeunit 2351 "Rest Client Impl."](../codeunit/2351.md) (3 calls: `PatchAsJson → Create`, `PostAsJson → Create`, `PutAsJson → Create`)
- [Codeunit 2353 "Http Request Message Impl."](../codeunit/2353.md) (1 call: `SetContent → GetHttpContent`)
- [Codeunit 2357 "Http Response Message Impl."](../codeunit/2357.md) (1 call: `SetResponseMessage → Create`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC26

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Http Content")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
