Support looking up binary files as HTTP-based APIs are increasingly supporting uploading of BASE64 encoded binaries in JSON documents.

Hi,

This is in regards to #11594. Many APIs these days allow embedding BASE64 encoded binary data in JSON documents. Here’s an example from Databricks, wherein the “content” field can contain BASE64 encoded binary data:

{
  "content": "MSsx\n",
  "path": "/Users/user@example.com/project/ScalaExampleNotebook",
  "language": "SCALA",
  "overwrite": true,
  "format": "SOURCE"
}

The lookup command cannot load binary files though. Consequently, we need to use command and curl in our Ansible playbooks.

Any plans to allow embedding BASE64-encoded binaries in JSON payloads when using the uri module?

Thanks in advance,
Behrang

Use the slurp task. lookups cannot do this because they are part of
Jinja2 templating.