---
title: "Get HTTP Response Content-Type in Workday Orchestrate"
description: "Retrieve the HTTP response Content-Type header in Workday Orchestrate using data.SendHTTPRequest.response.contentType() when responseHeaders omits it."
url: https://kiweely.com/guides/workday-orchestrate-http-response-content-type-header
---

# Reading the HTTP Response Content-Type Header in Workday Orchestrate

In Workday Orchestrate, data.SendHTTPRequest.responseHeaders.toString() omits the HTTP response Content-Type header. Call the Data member function data.SendHTTPRequest.response.contentType() directly on the response object to validate MIME types before uploading files to Workday.

-   **Checked** against Workday on November 6
-   Applies to **Workday Orchestrate**
-   3 min read
-   Published November 6
-   By Kiweely

## Why `responseHeaders` Does Not Return the `Content-Type` Header

When an orchestration uses the **Send HTTP Request** component (`Method: GET`, `Response Type: Any`) to download a file or binary asset from an external URL—such as fetching a product image from a Procurement Item URL link to populate `Primary_Image_Data` in Workday—you must verify that the remote server returned an actual binary file (for example, `image/jpeg` or `image/png`) rather than an HTML login page (`text/html`) or JSON error payload (`application/json`).

In Workday Studio, developers inspect the `Content-Type` header directly from the HTTP transport headers. In **Workday Orchestrate**, logging or inspecting `data.SendHTTPRequest.responseHeaders` (or `data.SendHTTPRequest.responseHeaders.toString()`) omits `Content-Type` and `Content-Length` because Orchestrate binds entity-level metadata directly to the `Data` object returned by `data.SendHTTPRequest.response`.

* * *

## Retrieving `Content-Type` with `response.contentType()`

In Workday Orchestrate, `data.<StepName>.response` is an instance of the **`Data`** type. As defined in **Reference: Data Member Functions**, the `Data` instance exposes entity header metadata through dedicated member functions:

| `Data` Member Function | Return Type | Description |
| --- | --- | --- |
| `data.SendHTTPRequest.response.contentType()` | `String` | Returns the MIME media type of the response entity (for example, `"image/png"`, `"application/pdf"`, or `"text/html"`). |
| `data.SendHTTPRequest.response.charset()` | `String` | Returns the `charset` parameter from the `Content-Type` header, or `"UTF-8"` if none was specified. |
| `data.SendHTTPRequest.response.contentLength()` | `Number` | Returns the size of the response document in bytes. |

To retrieve the `Content-Type` of an HTTP response in **Create Values**, **Branch on Conditions**, or **Continue on Conditions**, call `.contentType()` directly on `response`:

javascript

```
data.SendHTTPRequest.response.contentType()
```

* * *

## Validating Downloaded Images Before Updating Workday Procurement Items

When iterating over procurement items to download item images from external vendor URLs and upload them to Workday via SOAP (`Put_Purchase_Item_Request` / `Primary_Image_Data`), an invalid URL often returns HTTP `200 OK` with a `text/html` “Page Not Found” placeholder. Passing non-image bytes into `Primary_Image_Data` causes downstream SOAP validation failures or broken item thumbnails.

### Pattern: Guarding the Upload with `Branch on Conditions`

1.  Configure the **Send HTTP Request** step (`FetchItemImage`):
    -   **Method:** `GET`
    -   **URL:** `data.LoopItems.item.stringAtJsonPath("$.imageUrl")`
    -   **Settings Tab -> Response Type:** `Any` (so Orchestrate accepts any MIME type without throwing a parser error on binary data).
2.  Add a **Create Values** step (`InspectResponseMeta`) immediately after `FetchItemImage`:
    -   `mimeType` (`String`):
        
        javascript
        
        ```
        data.FetchItemImage.response.contentType().lowerCase()
        ```
        
    -   `fileSizeBytes` (`Number`):
        
        javascript
        
        ```
        data.FetchItemImage.response.contentLength()
        ```
        
    -   `isValidImage` (`Boolean`):
        
        javascript
        
        ```
        data.FetchItemImage.isSuccess
          .and(data.FetchItemImage.responseStatusCode.is2xxStatusCode())
          .and(data.FetchItemImage.response.contentType().lowerCase().startsWith("image/"))
          .and(data.FetchItemImage.response.contentLength() > 0)
        ```
        
3.  Add a **Branch on Conditions** step (`CheckMimeType`):
    -   **Branch 1 (`ValidImage`):** Condition `data.InspectResponseMeta.isValidImage == true`. Inside this branch, Base64-encode the binary response (`data.FetchItemImage.response.base64encode()`) and send the `Put_Purchase_Item_Request` SOAP call to Workday.
    -   **Branch 2 (`InvalidContentType`):** Default/Else branch. Log an **Add Integration Message** warning or write a row to your error log detailing the item ID and the unexpected `data.InspectResponseMeta.mimeType` value (such as `"text/html"`), then skip the Workday update.

### Preserving Consistently Typed Outputs Across Branches

Remember that if any step downstream of `CheckMimeType` references an output from inside the branch, both `ValidImage` and `InvalidContentType` branches must expose outputs with identical names and data types (for example, a **Create Values** step named `BranchResult` returning `status` as a `String`).

* * *

## Verifying `response.contentType()` in Your Tenant

1.  Open your orchestration in **Orchestration Builder** and run **DebugOrchestrations** with a test URL that returns an image (`image/jpeg` or `image/png`) and a second test URL that returns an HTML page (`text/html`).
2.  Select the `InspectResponseMeta` (**Create Values**) step in the debugger output panel and confirm that `data.FetchItemImage.response.contentType()` returns `"image/jpeg"` (or `"image/png"`) for the image URL and `"text/html"` for the webpage URL.
3.  Confirm that the `CheckMimeType` branch routes only `image/*` payloads to the Workday SOAP update step and logs a warning for non-image MIME types.

## Sources checked

-   [Reference: Data Member Functions](https://developer.workday.com/documentation/GUID-0727ac2b-5b69-498c-b211-3973c74726a9)
-   [Reference: Send HTTP Request](https://developer.workday.com/documentation/GUID-02220bf9-78fe-47fd-b580-0ca495548c97)
-   [Reference: HttpHeaders Member Functions](https://developer.workday.com/documentation/GUID-bbc9002a-f502-49ab-9845-2c32063ff1e6)
-   [Reference: String Member Functions](https://developer.workday.com/documentation/GUID-c22f5c68-87f5-4bd6-ad96-4e0d246e72c3)

## Related guides

[All guides](https://kiweely.com/guides)

-   [### Reading Integration Launch Attachments, Calling SOAP Integrations API, and Uploading ZIPs to Workday Drive in O4I In Orchestrate for Integrations (O4I), read launch files via an Integration Retrieval Service (‘Attach file at launch’) and documents.get(0). For Get\_Event\_Documents over SOAP, use /soap/v46.2/Integrations with .wrapSoapV11(), and test Workday Drive ZIP uploads outside Debug Mode.](https://kiweely.com/guides/workday-orchestrate-read-integration-attachment-retrieval-service)
-   [### Generating UUIDs with random.randomUUID() and Fixing stringAtJsonPath().toNumber() in Orchestrate Workday Orchestrate uses random.randomUUID() instead of PMD’s UUID() function to generate unique batch IDs, and requires chaining .toNumber() on the outer stringAtJsonPath() function rather than inside the JSONPath literal.](https://kiweely.com/guides/workday-orchestrate-randomuuid-stringatjsonpath-tonumber)
-   [### Storing and Migrating External Client CredStore OAuth Credentials and Masked Integration Attributes in Workday Orchestrate Store external OAuth 2.0 credentials in Workday’s External Client CredStore and non-OAuth credentials in masked Integration Attributes (Password display option). After promoting an app or refreshing a Sandbox tenant from Production, update the target tenant’s CredStore and attribute values.](https://kiweely.com/guides/workday-orchestrate-migrate-external-client-credstore-secrets)
-   [### JSONPath Logical Filter Expressions and Wildcard XPaths in Workday Orchestrate Compound JSONPath filter expressions (&&, ||) in Workday Orchestrate fail silently when typographic quotes are pasted or unsupported filter tokens are chained. Learn the supported JSONPath and wildcard XPath syntax and when to replace SOAP launch polling with Trigger Integration.](https://kiweely.com/guides/workday-orchestrate-jsonpath-logical-filters-xpath-wildcards)

### More guides on Orchestrate

[All 86 guides](https://kiweely.com/guides#orchestrate)

-   [Transforming dynamic-key JSON to CSV and grouping flat CSV rows into nested JSON in Orchestrate](https://kiweely.com/guides/workday-orchestrate-dynamic-json-keys-to-csv-grouped-json)
-   [Custom CSV formatting in Workday Orchestrate: Windows CRLF line endings, title rows, and skipping preamble lines](https://kiweely.com/guides/workday-orchestrate-csv-crlf-title-row-skip-header-lines)
-   [Resolving ‘\[StepException\] requirement failed: Input lists must be of the same size’ in createReferenceList](https://kiweely.com/guides/workday-orchestrate-createreferencelist-input-lists-same-size)
-   [Fixing ‘Fast forwarding to correct position’ and 45-minute timeouts in Orchestrate batchLoop](https://kiweely.com/guides/workday-orchestrate-batchloop-paginatedget-fast-forwarding-timeout)
-   [Overcoming ‘Message length should be lesser than 1MB in size’ and ‘Orchestration is too large to be saved’](https://kiweely.com/guides/workday-orchestrate-1mb-message-limit-too-large-to-save)
-   [Handling Silent GraphQL Errors in PMD and Orchestrate When HTTP Status Returns 200 OK](https://kiweely.com/guides/workday-graphql-http-200-silent-mutation-errors)
-   [Avoiding the 25-Second Synchronous Timeout When an Extend Page Calls External LLM APIs Through Orchestrate](https://kiweely.com/guides/workday-extend-async-orchestration-llm-timeout)
-   [Why Log to File Turns XML Closing Tags into <// and How to Write #if Conditions in CreateTextTemplate](https://kiweely.com/guides/workday-orchestrate-xml-double-slash-log-to-file-if-conditions)

### From the blog on Orchestrate

[All posts](https://kiweely.com/blog)

-   [How Kiweely Vine designs, builds, deploys, tests and monitors a Workday Orchestration for Integration](https://kiweely.com/blog/workday-orchestration-for-integration-with-kiweely)
-   [Why Workday Studio Remains Essential in an Orchestrate World](https://kiweely.com/blog/why-workday-studio-still-matters-with-orchestrate)
-   [Debugging Workday Extend apps and orchestrations in kiweely](https://kiweely.com/blog/debugging-workday-extend-apps-orchestrations-kiweely)

## Let Workday check the work.

Kiweely writes WQL and builds orchestrations in your own tenant, and Workday, not Kiweely, says whether they passed.

[Start for free](https://kiweely.com/download) [See how it works](https://kiweely.com/vine/how-it-works)

## Get the next guide in your inbox.

One email a month with new guides and one Extend tip. Nothing else.
