API / Error 415 unsupported media type for attachement xml.gz

Hello everyone,

I’m having trouble with the “http request” activity.

I’m trying to send a request and end up with the error 415.

The configuration of the activity is the same that I have on Postman where it’s working fine.

Any one would happen to know why there is this error and how to solve it ?

Have a nice day,


Please change the body format properly…you will have the option in http request properties…

The error suggest the format you are sending and quoting is different by default it would be application/json need to change as per your target format


This is malformed request or a unsupported type of data/ media in the payload.

IS content encoding part of the header ? Just see if you are placing the parameters correctly(Maybe something needs to be passed as a part of the body.

Your attachment could also be an issue, how are you passing attachment in postman, please share more details.


Hi @Geoffroy_Pantegnies

Please Change the Format and Check.

Thank you…

Thanks for your answer Anil.

I’ve tried all formats but it’s always the same result.

Thanks for your answer Prateek !

The content encoding is indeed in the header.

Here is what’s in Postman:


Thanks for your answer Kiran,

I’ve tried with all the formats and the return is always 415


I see its binary…please check this thread.


Thanks, I’ve droped the UiPath activity to make an invoke code based on your link !
Working fine :slight_smile:

Have a nice day.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.