LinkedIn
Copied!

Table of Contents

REST connector reads payload as binary data instead of text

Troubleshoot problems that occur when the REST connector reads the response as binary content instead of text content.

Condition

The REST connector reads the response improperly.

Cause

The response is missing or has an incorrect Content-Type header.

Remedy

  1. Confirm whether the Content-Type header is missing or blank.

  2. Check the Content-Type your application receives is valid for text content.

    Pega Platform reads the following Content-Type header values as text. If the Content-Type header is not a recognized text content type, Pega Platform reads the data as binary content.
    • text/*
    • message/*
    • application/

      • atom+xml
      • jwt
      • xhtml+xml
      • atomcat+xml
      • rss+xml
      • xml
      • atomdeleted+xml
      • soap+xml
      • xml-dtd
      • ecmascript
      • wsdl+xml
      • xml-external-parsed-entity
      • http
      • wspolicy+xml
      • xml-patch+xml
      • javascript
      • x-www-form-urlencoded
      • xmpp+xml
      • json
      • xhtml
      • xop+xml

  3. If you did not receive a content type from the endpoint or if the content type is incorrect, you can decode the Base64 content and revert it to text.

Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.