API endpoint /file produces attachment.bin files in project folder

Hello

We have an API (…/api/v1/edi/ehf/{ehf_id}/file) for getting a xml file from server.
Output as response string from HTTP Request activity and later Deserialize XML activity.

Each execute of HTTP Request is producing an attachment.bin file in project folder when debugging the process:

The attachment.bin file is containing the xml document:
image

There is no variables in options/output other than response content (string) and response status (int32):
image

What is causing this, and how to avoid it?
I have not tested from orchestrator on remote computer yet, but i hope its not happening there also, as it will fill up the drive fast when processing atleast 1000 documents each day.

Hi!

What do you send in your headers?
Maybe you can specify in content-type / accept to make it only return directly in the response content instead of as a file?

Yes i have tried to pass Content-Type: application/json or xml as header and parameterer. But no matter what i do UiPath passes the default Content-Type as application/octet-stream.

I have tried everything from this forum post:

I see.

You could build a httprequest in an invoke code, or a coded workflow instead of using the premade activities and see if that enables you to change the content-type?

Cant be bothered with this anymore, so I just specified a filePath for the resource returned and then Delete File right after. Not a big deal.

Thank you for replying :slight_smile: